eq_create_label: Create labels for earthquake epicenter mapping

Description Usage Arguments Examples

Description

This function takes the dataset as an argument and creates an HTML label that can be used as the annotation text in the leaflet map. This function puts together a character string for each earthquake that will show the cleaned location, the magnitude (EQ_PRIMARY), and the total number of deaths (TOTAL_DEATHS), with boldface labels for each ("Location", "Total deaths", and "Magnitude"). If an earthquake is missing values for any of these, both the label and the value will be skipped for that element of the tag.

Usage

1

Arguments

df

The cleaned data set by applying eq_clean_data() function to the raw data

Examples

1
2
3
4
5
 ## Not run: eq_clean_data(eq_download_data()) %>%
                    dplyr::filter(COUNTRY == "Mexico:" & lubridate::year(DATE) >= 2000) %>%
                    eq_create_label() %>%
                    eq_map(annot_col = "popup_text")
## End(Not run)

perfectslumber/NOAAsignif documentation built on May 23, 2019, 5:04 a.m.