eq_create_label: Create HTML labels

Description Usage Arguments Value Examples

Description

This function creates HTML labels for pop-up windows in leaflet maps.

Usage

1

Arguments

data

A data frame or tibble with the following columns: LOCATION_NAME, EQ_PRIMARY, and TOTAL_DEATHS.

Value

A character vector in HTML format.

Examples

1
2
3
4
5
6
7
8
# html label pop-up as in figure 2 of module 3
file <- system.file("extdata", "earthquakes.tsv.gz", package = "NOAAeq")
library(magrittr)
readr::read_delim(file = file, 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")

la-sch/NOAAeq documentation built on May 20, 2019, 7:31 p.m.