Description Usage Arguments Value Examples
View source: R/mapping_tools.R
Given a data frame containing NOAA earthquake data, this function returns a popup-text for each observation in the data frame. This popup-text consists of location name, magnitude and total number of deaths. If any of this information is not available, it will not show up in the popup-text.
1 |
df |
The data frame from which we will generate the popup-texts. |
A list of popup-texts for the earthquake observations given as input.
1 2 3 4 5 6 | readr::read_delim(file = system.file("extdata", "signif.txt", package="noaa"),
delim = "\t") %>%
eq_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.