eq_create_label: eq_create_label

Description Usage Arguments Details Value References Examples

Description

A function to create labels for popups of earthquakes in leaflet maps.

Usage

1

Arguments

data

A cleaned version of a NOAA data frame

Details

eq_create_label pust together a character string for each earthquake that will show the cleaned location (LOCATION_NAME, as cleaned by eq_location_clean), the magnitude (e.g., EQ_PRIMARY), and the total number of deaths (e.g., TOTAL_DEATHS), with boldface labels for each. If an earthquake has missing values for any of these, both the label and the value should be skipped.

Value

A character vector of strings in html format to label the popups in eq_map

References

https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1

Examples

1
2
3
4
5
6
7
8
## Not run: 
NOAAdf <- eq_clean_data("signif.txt")
NOAAdf %>%
        dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
        dplyr::mutate(popup_text = eq_create_label(.)) %>%
        eq_map(annot_col = "popup_text")

## End(Not run)

Darwinita/EarthquakingLCP documentation built on May 12, 2019, 8:40 a.m.