Description Usage Arguments Details Value Examples
More interesting pop-ups for the interactive map used with the eq_map() function
1 | eq_create_label(mapdata)
|
mapdata |
A cleaned data frame with data obtained from NOAA website |
This function return a more interesting pop-ups for the interactive map created with the eq_map() function. The function is called before the eq_map() function and used the same cleaned data. The cleaning of the data frame is done with the eq_clean_data() and eq_location_clean() functions of this package. For each earthquake, the pop-up will show its "Location", "Total deaths" and "Magnitude".
An HTML label that can be used as the annotation text in the leaflet map.
1 2 3 4 5 6 7 8 9 | ## Not run:
readr::read_delim("signif.txt", delim = "\t") %>%
eq_clean_data() %>%
eq_location_clean() %>%
dplyr::filter(COUNTRY == "JAPAN" & lubridate::year(DATE) >= 2005) %>%
dplyr::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.