eq_create_label: eq_create_label

Description Usage Arguments Details Value Examples

Description

Creates a html string for a more representative label.

Usage

1

Arguments

data

a dataframe containing NOAA details

Details

put together a character string for each earthquake that shows the cleaned location (as cleaned by the eq_location_clean), 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 are skipped for that element of the tag.

Value

character string

Examples

1
2
3
4
5
6
7
8
## Not run: 
readr::read_delim("earthquakes.tsv.gz", delim = "\t") %>%
eq_clean_data() %>%
dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
dplyr::mutate(popup_text = eq_create_label(.)) %>%
eq_map(annot_col = "popup_text")

## End(Not run)

fdelzompo/MSDR documentation built on May 3, 2019, 2:58 p.m.