Description Usage Arguments Value Examples
This function creates HTML labels for pop-up windows in leaflet maps.
1 |
data |
A data frame or tibble with the following columns:
|
A character vector in HTML format.
1 2 3 4 5 6 7 8 | # html label pop-up as in figure 2 of module 3
file <- system.file("extdata", "earthquakes.tsv.gz", package = "NOAAeq")
library(magrittr)
readr::read_delim(file = file, 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.