eq_map: Earthquake map

Description Usage Arguments Value Author(s) Examples

Description

The function takes an argument data containing the filtered data frame with earthquakes to visualize. The function maps the epicenters (LATITUDE/LONGITUDE) and annotates each point with in pop up window containing annotation data stored in a column of the data frame. The user should be able to choose which column is used for the annotation in the pop-up with a function argument named annot_col. Each earthquake should be shown with a circle, and the radius of the circle should be proportional to the earthquake’s magnitude (EQ_PRIMARY).

Usage

1
eq_map(frame, annot_col = "date")

Arguments

frame

The earthquake data frame. See the documentaton in the data part. A cleaned version also can be used, cleaning: 'eq_clean_data()'.

annot_col

The data frame column name containing the popup annotation.

Value

a leaflet widget object. The output can be interactive if viewed in the “Viewer” panel of RStudio or if included in a HTML document created with R Markdown, and they can be incorporated into Shiny web applications.

Author(s)

József Varga

Examples

1
2
3
4
earthquakes %>%
  eq_clean_data() %>%
  dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(date) >= 2000) %>%
  eq_map(annot_col = "EQ_PRIMARY")

cogitoergoread/noaa documentation built on May 20, 2019, 1:28 p.m.