Description Usage Arguments Value See Also Examples
Create a nicely formatted HTML label for use with eq_map
showing Location, Magnatude, and Total Deaths. Missing values are skipped
in the created label.
1 | eq_create_label(earthquake_data)
|
earthquake_data |
A dataframe containing location names in column
|
A character vector of formatted html strings to label the popups in
eq_map
eq_map
, leaflet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(data.table)
library(dplyr)
raw_noaa <- as.data.table(noaa_data)
raw_noaa %>%
eq_clean_data() %>%
dplyr::filter(COUNTRY == "MEXICO" & DATE >= as.Date("2000-01-01")) %>%
eq_map(annot_col = "DATE")
## Plot earthquakes in Mexico with nicely formated popup windows
raw_noaa %>%
eq_clean_data() %>%
eq_location_clean() %>%
dplyr::filter(COUNTRY == "MEXICO" & DATE >= as.Date("2000-01-01")) %>%
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.