eq_create_label: Create label for mapping earthquake data

Description Usage Arguments Value Examples

View source: R/code.R

Description

Function creates a label column ("popup_text") in a data frame that has been cleaned with eq_clean_data. The column contains html formatted text for use as a label with the eq_map function. The label contains location, maginitude and deaths of each earthquake in the data frame. If any earthquake is missing one of those things, the label omits that line.

Usage

1
eq_create_label(clean_data_frame)

Arguments

clean_data_frame

Data frame of earthquake data that has been processed with eq_clean_data.

Value

List of character objects that can be used to create labels in eq_map.

Examples

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

## End(Not run)

khailper/swdevcapstone documentation built on May 20, 2019, 9:22 a.m.