eq_map: Leaflet Map Tools

Description Usage Arguments Details Value Examples

View source: R/eq_map.R

Description

eq_map creates a leaflet map showing the location of each earthquakes on the map.

Usage

1
eq_map(data, annot_col)

Arguments

data

The NOAA_data data frame.

annot_col

The name of the column to be used for annotation and it has to be a character strings of length one.

Details

The function maps the epicenters Longitude and Latitude and annotates each point with in popup window containing annotation data stored in a column of the data frame. The use can choose which column to be used for popup.

Value

Returns a leaflet map.

Examples

1
2
3
4
5
6
7
8
## Not run: 
NOAA_data <- NOAA_data %>%
eq_clean_data() %>%
eq_location_clean() %>%
dplyr::filter(Country == "MEXICO" & lubridate::year(Date) >= 2000)
eq_map(data = NOAA_data, annot_col = "Date")

## End(Not run)

ankit2219/masteringr documentation built on Dec. 24, 2021, 1:25 a.m.