eq_create_label: Map NOAA earthquake data

Description Usage Arguments Value References See Also Examples

Description

eq_create_label builds a vector combining location, magnitude and deaths for display in map popups

Usage

1

Arguments

df

is the cleaned NOAA data frame after eq_clean_data has been called - a link to the data source and to the data descriptions can be found below in the refereces

Value

a character vector with the combined information location, magnitude and total deaths. This vector can be added to the earthquake data frame to enhance popup display

References

The NOAA earthquake database https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1 and the data defintions can be found at https://www.ngdc.noaa.gov/nndc/struts/results?&t=101650&s=225&d=225

See Also

eq_map to create the map of earthquake locations and eq_clean_data to prepare the NOAA data

Examples

1
2
3
4
5
6
7
8
## Not run: 
readr::read_delim("earthquakes.tsv.gz", delim = "\t") %>%
  eq_clean_data() %>%
  dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
  dplyr::mutate(popup_text = eq_create_label(.)) %>%
  eq_map(annot_col = "popup_text")

## End(Not run)

jrwalker-projects/quaker documentation built on May 23, 2019, 7:33 a.m.