eq_map: Map NOAA earthquake data

Description Usage Arguments Value References See Also Examples

Description

eq_map displays an interactive map showing earthquake locations from the NOAA earthquake data. eq_map uses the leaflet R package to

Usage

1
eq_map(df, annot_col, pretty = FALSE)

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

annot_col

is a single text value for the column name to be displayed as the popup value when the user hovers over a data point on the map. This column can be a single data item, for example "DATE" or this can be a column of combined values using the eq_create_label function.

pretty

single logical value. If pretty is true, the columne name of 'annot_col' is displayed prior to the value in the popup. If pretty is FALSE or not passed, only the value is displayed.

Value

the cleaned NOAA data frame

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_create_label to create popup display with multiple columns and eq_clean_data to prepare the NOAA data

Examples

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

## End(Not run)

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