eq_map: eq_map function

Description Usage Arguments Details Value Examples

View source: R/map.R

Description

This function receives a data set of earthquake information and plots it on an interactive map using leaflet. It will use the annot_col parameter to set the value of the pop-up based column of the data set that matches annot_col.

Usage

1
eq_map(df_data, annot_col = "DATE")

Arguments

df_data

The data set containing the earthquake information

annot_col

The column that will be used for the pop-up. Default set to DATE

Details

The earthquakes are mapped using the Latitude and Longitude for each and the size of the circle reflects the magnitude of the earthquake.

Value

An interactive leaflet map displaying the earthquakes contained in the dataset

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)

pvisser82/earthquakedata documentation built on May 19, 2019, 3:05 a.m.