Git Product home page Git Product logo

ship-dashboard's Introduction

Ship Dashboard App ๐Ÿšข

This is a Shiny app that allows you to visualize the sailed distance between two consecutive observations of a ship on a map. The app also allows the user to select the vessel type and vessel name to display the most recent distance sailed.

Installation

To run this app, you will need to have R installed. Once installed, you can install the necessary packages by running:

install.packages(c("shiny", "shinyWidgets", "shiny.semantic", "htmltools", "leaflet", "dplyr", "magrittr", "geosphere"))

After installing the required packages, download the ships.rds dataset and store it in your working directory.

How to use

To use the app, open R and navigate to the folder containing the ui.R and server.R files. Run the shinyApp() function to launch the app.

library(shiny)

# Run the app
shiny::runApp("path/to/folder")

Once launched, the app will display a title and a map with a legend. The user can select a vessel type and a vessel name to display the most recent sailed distance on the map.

User Interface

The user interface is composed of the following components:

Title

The title displays the name of the app.

Map

The map displays the location of the ship and the distance it has sailed between two consecutive observations.

User Controls

The user controls consist of two dropdown menus:

  • Vessel Type: allows the user to select the type of vessel to display.
  • Vessel Name: allows the user to select the name of the vessel to display.

How it works

The app is built using Shiny and leaflet. The ships.rds dataset is imported into the app and used to display the most recent sailed distance between two consecutive observations of a ship.

The app uses the geosphere package to calculate the distance between two consecutive locations. The dplyr and magrittr packages are used to manipulate and filter the dataset to obtain the most recent observation with the longest sailed distance.

Credits

This app was developed by Hamza. The app uses the following packages:

  • shiny: provides the framework for the app.
  • shinyWidgets: provides the dropdown menus for user selection.
  • shiny.semantic: provides the grid template for the layout.
  • htmltools: provides the HTML formatting for the app.
  • leaflet: provides the mapping functionality.
  • dplyr: provides the data manipulation functionality.
  • magrittr: provides the pipe operator functionality.
  • geosphere: provides the distance calculation functionality.

ship-dashboard's People

Contributors

himloul avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.