eq_create_label: Popup annotation for 'eq_map' with Location, Magnitude, and...

Description Usage Arguments Value Examples

View source: R/map.R

Description

Creates an annotation for each earthquake that will show the location, magnitude (EQ_PRIMARY), and total number of deaths (TOTAL_DEATHS), with respective labels "Location", "Total deaths", and "Magnitude". If an earthquake is missing values for any of these, both the label and the value will be skipped for that element of the tag.

Usage

1

Arguments

data

Filtered dataframe of NOAA earthquakes dataset

Value

Popup text for Location, Magnitude, and Total number of Deaths (HTML formatted)

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
 eq_create_label(data)

 data %>%
       dplyr::filter(COUNTRY %in% COUNTRIES & YEAR >= 2000) %>%
       dplyr::mutate(popup_text = eq_create_label(.)) %>%
       eq_map(annotation = "popup_text")

## End(Not run)

blauwers/rEarthQuakes documentation built on May 7, 2019, 2:54 a.m.