eq_create_label: function to create a HTML label for Location, Magnitude, and...

Description Usage Arguments Examples

Description

This function should put together a character string for each earthquake that will show the cleaned location (as cleaned by the eq_location_clean() function created in Module 1), the magnitude (EQ_PRIMARY), and the total number of deaths (TOTAL_DEATHS), with boldface labels for each ("Location", "Total deaths", and "Magnitude").

@details If an earthquake is missing values for any of these, both the label and the value should be skipped for that element of the tag.

#refactor to stadard evauation without mutation

Usage

1

Arguments

df

with significant earthquakes data

Examples

1
2
3
4
5
6
7
8
## Not run: 
eq_location_clean() %>%
   dplyr::filter(COUNTRY %in% c('JAPAN')) %>%
   dplyr::filter(DATE > '2000-01-01') %>%
   dplyr::mutate(popup_text = eq_create_label(.)) %>%
   eq_map(annot_col = "popup_text")

## End(Not run)

nobuhiroK/MSDRCapstone3 documentation built on May 31, 2019, 8:49 p.m.