Description Usage Arguments Value Examples
The function creates an HTML label, which can be used as the annotation text in the leaflet map. The function combines the following information about an earthquake:
Location
Magnitude
Total number of deaths
If an earthquake is missing values for any of these items, it is skipped for that element of the tag.
1 |
data |
A row of data frame data containing earthquake related data. |
An HTML label, which can be used as the annotation text in the leaflet map
1 2 3 4 5 6 | library(dplyr)
file_read() %>%
eq_clean_data() %>%
dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2014) %>%
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.