eq_create_label: Popup Label for Earthquake Map

Description Usage Arguments Details Value Examples

View source: R/map_tools.R

Description

Generates HTML labels for earthquake map

Usage

1

Arguments

data

The earthquakes data frame.

Details

eq_create_label creates a more descriptive and HTML-formatted popup label to be used in eq_map.

This function creates a vector of HTML-formatted labels using supplied earthquakes data. The function creates lines of the format Label: value from the following variables in the earthquakes data set:

Any of the above variables with missing/NA values are omitted from the label.

Value

A vector with the HTML-formatted labels. Include this vector with the data frame that is sent to eq_map.

Examples

1
2
3
4
5
6
7
8
## Not run: 
earthquakes <- earthquakes %>%
 dplyr::filter(Country == 'China') %>%
 dplyr::filter(lubridate::year(Date_ymd) >= 2000) %>%
 dplyr::mutate(Popup_Text = eq_create_label(.))
 eq_map(earthquakes, annot_col = "Popup_Text")

## End(Not run)

SondergardM/MSDRCapstone documentation built on Dec. 18, 2021, 2:07 p.m.