Description Usage Arguments Details Value References Examples
A function to create labels for popups of earthquakes in leaflet maps.
1 |
data |
A cleaned version of a NOAA data frame |
eq_create_label
pust together a character string for each earthquake
that will show the cleaned location (LOCATION_NAME
, as cleaned by eq_location_clean
),
the magnitude (e.g., EQ_PRIMARY
), and the total number of deaths (e.g.,
TOTAL_DEATHS
), with boldface labels for each. If an earthquake has missing
values for any of these, both the label and the value should be skipped.
A character vector of strings in html format to label the popups in
eq_map
https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1
1 2 3 4 5 6 7 8 | ## Not run:
NOAAdf <- eq_clean_data("signif.txt")
NOAAdf %>%
dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
dplyr::mutate(popup_text = eq_create_label(.)) %>%
eq_map(annot_col = "popup_text")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.