eq_create_label: Creates an HTML formatted label

Description Usage Arguments Details Value Examples

View source: R/eq_map.R

Description

This function creates an HTML formatted label that can be used for the leaflet map pop up information. It includes location name, magnitude and casualties from NOAA earthquake data.

Usage

1

Arguments

data

A data frame containing cleaned NOAA earthquake data

Details

The input data.frame needs to include columns LOCATION_NAME, EQ_PRIMARY and TOTAL_DEATHS with the earthquake location, magintude and total casualties respectively.

Value

A character vector HTML formatted with earthquakes information

Examples

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

## End(Not run)

eregmig/earthquake documentation built on May 17, 2019, 7:04 p.m.