eq_map: Plot a leaflet map with annotations

Description Usage Arguments Value Examples

View source: R/maps.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

df

The dataframe of data that we wish to plot

annot_col

The column from our input dataframe that we'll use as an annotation column

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)

simongarisch/R-Capstone-NOAA documentation built on May 24, 2019, 7:25 p.m.