July 30, 2017

Earthquake visualizations Shiny App

This Shiny App can be seen in action at: https://ykv001.shinyapps.io/ykvwk4/.

It displays interactive maps created with the plotly and leaflet libraries. The events covered are:

  1. World Earquakes for July 2017 4.5+ Magnitude
  2. Historical Earthquake fatalities by country from 1000 B.C.E to 2015

The first one is a from the plotly library with USGS data and the second uses a custom build package to visualize earthquake data from NOAA. This Package was created for the capstone project of Mastering Software Development in R. https://gitub.com/ykv001/ykvdpcap

Capabilities

  • The first visualization is created by selecting a minimum and maximum earthquakes' magnitude. Since the data is not small a new submit request is required to update the map. The main legend gives the magnitude, the size of the elements is also function of the magnitude. Indiviudal marker's legend display exact coordinates and location by name.

  • As historical visualization the second one provides a data input for the starting year and country of interest. Most of the countries are included. Option to display Earthquake location and fatalities or date is available as well.

The Data (sample)

1.World Earquakes for July 2017 4.5+ Magnitude

knitr::kable(head(eqs))
longitude latitude mag place updated
150.9531 46.2103 5.7 262km ENE of Kuril'sk, Russia 2017-07-30T21:19:58.720Z
68.1715 37.9639 4.6 33km E of Sho'rchi, Uzbekistan 2017-07-30T21:21:50.040Z
-27.9552 -54.5760 5.1 241km NNW of Visokoi Island, South Georgia and the South Sandwich Islands 2017-07-30T18:02:39.040Z
50.5730 31.8058 5.0 50km S of Farsan, Iran 2017-07-30T16:44:18.040Z
143.7036 36.2936 5.3 265km ESE of Iwaki, Japan 2017-07-30T13:00:21.040Z
149.9382 -1.4052 4.7 160km NW of Kavieng, Papua New Guinea 2017-07-30T13:16:16.040Z

Visualization (sample)

2.Historical Earthquake fatalities by country from 1000 B.C.E to 2015

eq_clean %>%
        dplyr::filter(COUNTRY == "JAPAN" & lubridate::year(DATE) >= 1980) %>%
        dplyr::mutate(popup_text = eq_create_label(.)) %>%
        eq_map(annot_col ="popup_text")