Description Usage Arguments Value Examples
This function takes the filtered and cleaned dataframe as an argument and creates an HTML label that can be used as the annotation text in a leaflet map created by eq_map(). This function puts together a character string for each earthquake that shows the cleaned location (as cleaned by the eq_location_clean() function), the magnitude, and the total number of deaths, with boldface labels for each. If an earthquake is missing values for any of these, both the label and the value are skipped for that element of the tag.
1 | eq_create_label(dataframe)
|
dataframe |
A filtered and cleaned (as cleaned by the eq_location_clean() function) dataframe with the earthquakes to visualize. |
A dataframe containing a column named "popup_text" with the character string to be used as input in the eq_map() function.
1 2 3 4 | ## Not run:
eq_clean_data("signif.txt") %>% dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATETIME) >= 2000) %>% 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.