eq_create_label: Create an HTML label for the leaflet map

Description Usage Arguments Details Value Examples

Description

Create an HTML label for the leaflet map

Usage

1

Arguments

data

The input data.frame

Details

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"). 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.

Value

A vector of label strings

Examples

1
2
3
4
5
6
## Not run: 
  data %>%
    dplyr::mutate(popup_text = eq_create_label(.)) %>%
    eq_map(annot_col = "popup_text")

## End(Not run)

learner42/CourseraRcapstone documentation built on May 30, 2019, 4:37 p.m.