Description Usage Arguments Value Examples
View source: R/mapping_tools.R
This function uses leaflet to plot latitude and longitude for earthquake epicenters on a map. The map is fully interactive and the epicenter markers are clickable which provides a short text that is grabbed from a column chosen by the caller of the function. The radius of the epicenter markers is based on the earthquake's magnitude.
1 |
df |
The data frame containing the NOAA earthquake data. |
annot_col |
The column containing the text displayed when an epicenter marker is clicked. |
The leaflet htmlwidget containing the interactive map with earthquake visualization overlayed.
1 2 3 4 | readr::read_delim(file = system.file("extdata", "signif.txt", package="noaa"), delim = "\t") %>%
eq_clean_data() %>%
dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
eq_map(annot_col = "DATE")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.