eq_map: This method uses leaflet to plot latitude and longitude for...

Description Usage Arguments Value Examples

Description

This method uses leaflet to plot latitude and longitude for earthquakes on the map. The map is interactive with markers that are clickable for showing a text.

Usage

1
eq_map(df, annot_col)

Arguments

df

The data frame with earthquake data.

annot_col

The column name with the text displayed for the markers.

Value

The leaflet as htmlwidget with the interactive map

Examples

1
2
3
4
5
6
7
8
## Not run: 
 f <- system.file("extdata", "signif.txt", package="earthquakes")
 a <- readr::read_delim(file = f, delim = "\t")
 b <- eq_clean_data(a)
 c <- dplyr::filter(b, COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
 eq_map(c, annot_col = "DATE")

## End(Not run)

bernd-mueller/earthquakes documentation built on May 7, 2019, 8 a.m.