Exploring earthquake data using shiny dashboard
R HTML CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
mapdata
pictures
www
.gitignore
LICENSE
README.md 🌏 updated data to include 22 July quake; readme edits Jul 23, 2015
about.html
server.R
ui.R

README.md

#About Nepal Quake dashboard

This is a simple implementation of Shiny dashboard to explore the Nepal earthquake data. The earthquake data used here is NOT real-time. The records were downloaded from USGS website (csv format) and placed in the data folder. To filter the quakes in the vicinity of Nepal, only the quakes within the bounding box of Nepal map are used.

You can try the app live at: https://asheshwor.shinyapps.io/np-quake.

You can also run the app locally in RStudio by using the following code.

## Install missing packages
packagesRequired <- c("shinydashboard", "leaflet", "dplyr",
                      "reshape2", "scales", "ggplot2",
                      "data.table", "rgdal", "jsonlite",
                      "shiny")
packagesToInstall <- packagesRequired[!(packagesRequired %in%
                                          installed.packages()[,"Package"])]
if(length(packagesToInstall)) install.packages(packagesToInstall)
## Run app from Github repo
shiny::runGitHub('asheshwor/np-quake')

app screenshot Screenshot of app's front page

app screenshot Screenshot of app's fatalities page

Disclaimer

I am not an earthquake expert. This is not at an attempt to predict aftershock events.

R packages used

  • shinydashboard
  • leaflet
  • dplyr
  • scales
  • ggplot2
  • reshape2
  • data.table
  • rgdal
  • jsonlite

Source code

Full source code is available from the following github repo: https://github.com/asheshwor/np-quake

Attribution

Earthquake data: This app uses earthquake data from USGS http://earthquake.usgs.gov/earthquakes/feed/v1.0/csv.php
Fatalities, injuries and damage data: Ministry of Home Affairs (MoHA)/National Emergency Operation Center (NEOC) official figures for casualties and damages [5 June update] MoHA/NEOC official figures Google spreadsheet link
Nepal districts map geojson file: Shared under MIT license by Saugat Acharya https://github.com/mesaugat/geoJSON-Nepal
Map data: The maps are generated using leaflet for R. Map tiles from Mapbox. Mapbox uses map data from Open Street Maps.