eq_create_label: Create an earthquake label column

Description Usage Arguments Value Examples

View source: R/mapping tool.R

Description

This function takes a dataframe (earthquake_data) and returns a character vector of HTML column names. Note that the dataframe must have columns CLEAN_LOCATION_NAME, EQ_PRIMARY and DEATHS.

Usage

1

Arguments

earthquake_data

The dataframe that we'll be using to create our annotation column.

Value

Returns a character vector of earthquake details that we can use for map annotations.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
map2 <-load_data() %>%
  eq_clean_data() %>%
  dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(date) >= 2000) %>%
  dplyr::mutate(popup_text = eq_create_label(.)) %>%
  eq_map(annot_col = "popup_text")
print(map2)

## End(Not run)

dannyjwpark/NOAA documentation built on Dec. 31, 2020, 11:11 p.m.