Description Usage Arguments Value Examples
View source: R/eq_create_label.R
This function creates content to be displayed inside of the popups plotted by the eq_map function.
1 | eq_create_label(df_create_label = rlang::.data)
|
df_create_label |
DataFrame with information about earthquakes, must have LOCATION, EQ_PRIMARY, and TOTAL_DEATHS columns |
Vector with content to be used by eq_map function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# Full example using eq_clean_data, eq_create_label, and eq_map.
readr::read_delim("inst/extdata/signif.txt",
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")
# From a given dataframe (assuming my_dataframe has LOCATION, EQ_PRIMARY, and TOTAL_DEATHS columns).
my_dataframe %>%
plyr::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.