Description Usage Arguments Details Value Examples
eq_create_label creates a more descriptive and HTML-formatted popup
label to be used in eq_map.
1  | 
data | 
 The   | 
This function creates a vector of HTML-formatted labels using supplied
quakes data.  The function creates lines of the format
Label:  value from the following variables in the quakes
data set:
DATE
 LOCATION_NAME (as cleaned in the eq_location_clean
function).
EQ_PRIMARY (earthquake magnitude)
TOTAL_DEATHS
Any of the above variables with missing/NA values are skipped in the label.
A vector with the HTML-formatted labels. You should include this
vector with the data frame that is sent to eq_map.
1 2 3 4 5 6 7  | library(dplyr); library(lubridate)
## Create a popup_text variable and use that for the label
quakes <- eq_load_clean_data() %>%
 dplyr::filter(COUNTRY == 'JAPAN') %>%
 dplyr::filter(lubridate::year(DATE) >= 2000) %>%
 dplyr::mutate(popup_text = eq_create_label(.))
eq_map(quakes, annot_col = 'popup_text')
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.