eq_map: Plot a leaflet map with annotations

Description Usage Arguments Value Examples

View source: R/mapping tool.R

Description

We take a subset of our earthquake data and plot this on a map using leaflet. See the leaflet docs (?leaflet) for a few relevant examples. The input dataframe requires columns including LONGITUDE, LATITUDE, EQ_PRIMARY. The annotation column ('annot_col') is also a required argument (no defaults).

Usage

1
eq_map(df, annot_col)

Arguments

annot_col
earthquake_data

The dataframe of data that we wish to plot

Value

Returns an interactive leaflet map that you can print to the viewer.

Examples

1
2
3
4
5
6
7
8
## Not run: 
 map1 <-load_data() %>%
   eq_clean_data() %>%
   dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(date) >= 2000) %>%
   eq_map(annot_col = "date")
 print(map1)

## End(Not run)

dannyjwpark/NOAA documentation built on Dec. 31, 2020, 11:11 p.m.