Description Usage Arguments Value Examples
This function generates an HTML code that can be dispalyed in the popup of a leaflet map. Four items are displayed, each on a separate line: date, location, magnitude and total deaths. If any of the variables is NA, the entire line is not included. If none of the variables are present in the data frame, the annotation would be empty.
1 |
data |
a data frame from which extracting the required information to be showed as popup |
character vector containing HTML code
1 2 3 4 5 6 7 8 9 | ## Not run:
annot <- eq_create_label(data)
data %>%
dplyr::filter(COUNTRY == "ITALY" & lubridate::year(DATE) >= 1000) %>%
dplyr::mutate(popup_text = eq_create_label(.))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.