eq_create_label: Function to create annotations to be displayed in the maps...

Description Usage Arguments Value Examples

Description

This function takes the filtered and cleaned dataframe as an argument and creates an HTML label that can be used as the annotation text in a leaflet map created by eq_map(). This function puts together a character string for each earthquake that shows the cleaned location (as cleaned by the eq_location_clean() function), the magnitude, and the total number of deaths, with boldface labels for each. If an earthquake is missing values for any of these, both the label and the value are skipped for that element of the tag.

Usage

1
eq_create_label(dataframe)

Arguments

dataframe

A filtered and cleaned (as cleaned by the eq_location_clean() function) dataframe with the earthquakes to visualize.

Value

A dataframe containing a column named "popup_text" with the character string to be used as input in the eq_map() function.

Examples

1
2
3
4
## Not run: 
eq_clean_data("signif.txt") %>% dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATETIME) >= 2000) %>% eq_create_label() %>% eq_map(annot_col = "popup_text")

## End(Not run)

DanielAyllon/EarthQuakeAnalyzer documentation built on May 6, 2019, 1:23 p.m.