This is a simple implementation of Shiny dashboard to explore the April 2015 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.
Alternatively, you can also run the app locally in RStudio by using the following code.
## Install missing packages
packagesRequired <- c("shinydashboard", "leaflet", "dplyr",
"tidyverse", "scales", "ggplot2",
"data.table", "sf", "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')
Screenshot of app's fatalities page
I am not an earthquake expert. This is not at an attempt to predict aftershock events.
- shinydashboard
- leaflet
- dplyr
- sf
- scales
- ggplot2
reshape2- tidyverse
- data.table
rgdal- jsonlite
Full source code is available from the following github repo: https://github.com/asheshwor/np-quake
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.