eq_create_label: Given a data frame containing NOAA earthquake data, this...

Description Usage Arguments Value Examples

View source: R/mapping_tools.R

Description

Given a data frame containing NOAA earthquake data, this function returns a popup-text for each observation in the data frame. This popup-text consists of location name, magnitude and total number of deaths. If any of this information is not available, it will not show up in the popup-text.

Usage

1

Arguments

df

The data frame from which we will generate the popup-texts.

Value

A list of popup-texts for the earthquake observations given as input.

Examples

1
2
3
4
5
6
readr::read_delim(file = system.file("extdata", "signif.txt", package="noaa"),
                  delim = "\t") %>%
eq_clean_data() %>%
dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
dplyr::mutate(popup_text = eq_create_label(.)) %>%
eq_map(annot_col = "popup_text")

chrpihl/noaa documentation built on May 25, 2019, 3:26 p.m.