eq_create_label: Create Earthquake HTML Label

Description Usage Arguments Value Examples

View source: R/eq_maps.R

Description

eq_create_label creates a formatted HMTL label for use with eq_map that shows location, magnitude and total deaths, adjusting the label for any missing values.

Usage

1

Arguments

df

A data frame containing location names in LOCATION_NAME, earthquake magnitude in EQ_PRIMARY and total deaths in TOTAL_DEATHS.

Value

A character vector of formatted HTML strings to label popups in eq_map.

Examples

1
2
3
4
5
6
7
8
## Not run: 
earthquakes %>% eq_filter_data(countries = c("Mexico"),
                               minimum_date = "1980-01-01",
                               maximum_date = "2018-12-31") %>%
      mutate(POPUP_TEXT = eq_create_label(.)) %>%
      eq_map(annot_col = "POPUP_TEXT")

## End(Not run)

dtminnick/earthquake documentation built on Nov. 4, 2019, 11:04 a.m.