eq_create_label: Earthquake popup text

Description Usage Arguments Value Examples

Description

This function takes the earthquake dataset data - generated by U.S. National Oceanographic and Atmospheric Administration (NOAA) database - as an argument and creates an HTML label that can be used as the annotation text in the leaflet map.

Usage

1

Arguments

data

A preproccessed tibble (data.frame) of NOAA earthquakes dataset

Value

This function returns a character string for each earthquake that will show the cleaned location (LOCATION_NAME), the magnitude (EQ_PRIMARY), and the total number of deaths (TOTAL_DEATHS).

Examples

1
2
3
library(dplyr)
NOAA_clean_data = eq_clean_data("https://www.ngdc.noaa.gov/nndc/struts/results?type_0=Exact&query_0=$ID&t=101650&s=13&d=189&dfn=signif.txt")
NOAA_clean_data %>% dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>% dplyr::mutate(popup_text = eq_create_label(.)) %>% eq_map(annot_col = "popup_text")

volansys/earthquake-visualization documentation built on May 3, 2019, 6:40 p.m.