eq_map: eq_map

Description Usage Arguments Details Value Examples

Description

Creates a html map using leaflet to show NOAA data (see eq_clean_data for more details)

Usage

1
eq_map(data, annot_col = NULL)

Arguments

data

a dataframe containing NOAA details

annot_col

any column of the dataframe, will be converted to character and used as label

Details

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).

Value

a leaflet map

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")

## End(Not run)

fdelzompo/MSDR documentation built on May 3, 2019, 2:58 p.m.