eqvis-package: Generate Earthquake Visualizations

Description Details Author(s)

Description

eqvis provides functions to visualize the NOAA earthquake data using either a timeline or map. The earthquake data must be cleaned first using the eq_clean_data function. With this function, the country and colon are removed from the LOCATION_NAME and it is converted to title case. A new DATE column is derived from the date parts (YEAR, MONTH, DAY). LATITUDE and LONGITUDE are converted to numeric.

Details

A timeline can be produced using ggplot2 with the geom_timeline/stat_timeline functions. It will plot a timeline with points for each earthquake and can optionally include a size and color/fill aesthectics. If xmin and xmax aesthetics are provided, stat_timeline will subset the data. The geom_timeline_label function can be used to add a label geom. It print the label aesthetic for the top n_max earthquakes in terms of magnitude.

A map can be produced using eq_map(). It will display circle markers at the lat/lon locations with a radius based on the magnitude of the earthquake and popup text reflecting the annotation column provided. An optional eq_create_label function is provided that generate label text using the location name, magnitude and deaths for the earthquake.

The data can be retrieved with the following:

file_url <- "https://www.ngdc.noaa.gov/nndc/struts/results?type_0=Exact&query_0=$ID&t=101650&s=13&d=189&dfn=signif.txt"

eq <- read.delim(file_url)

Author(s)

Maintainer: Kim Aquilino kim.aquilino@gmail.com


kaquilino/eqvis documentation built on May 17, 2019, 2:44 p.m.