eq_create_label: Create Label for the Map

Description Usage Arguments Value Examples

Description

This function takes the dataset as an argument and creates an HTML label that can be used as the annotation text in the leaflet map. The annotation text shows the cleaned location, the earthquakes magnitude and the total number of deaths.

Usage

1

Arguments

data

R dataframe corresponding to the NOAA significant earthquakes dataset

Value

String vector containing text annotation for each observation

Examples

1
2
3
4
5
6
7
8
9
## Not run: eq_data <- readr::read_delim('signif.txt', delim = '\t')
## Not run: 
    eq_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')

## End(Not run)

blnash508/EarthquakesNOAA documentation built on May 14, 2019, 5:25 p.m.