Description Usage Arguments Value Examples
This function takes the earthquake dataset data
-
generated by U.S. National Oceanographic and Atmospheric Administration
(NOAA) database - as an argument and creates an HTML label that can
be used as the annotation text in the leaflet map.
1 |
data |
A preproccessed tibble (data.frame) of NOAA earthquakes dataset |
This function returns a character string for each earthquake that will show the cleaned location (LOCATION_NAME), the magnitude (EQ_PRIMARY), and the total number of deaths (TOTAL_DEATHS).
1 2 3 | library(dplyr)
NOAA_clean_data = eq_clean_data("https://www.ngdc.noaa.gov/nndc/struts/results?type_0=Exact&query_0=$ID&t=101650&s=13&d=189&dfn=signif.txt")
NOAA_clean_data %>% dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>% dplyr::mutate(popup_text = eq_create_label(.)) %>% eq_map(annot_col = "popup_text")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.