eq_create_label: Create Pop-Ups to be utilized by the function eq_map()

Description Usage Arguments Details Value Examples

View source: R/eq_map.R

Description

Create Pop-Ups to be utilized by the function eq_map()

Usage

1

Arguments

df_map

data frame. cleaned NOAA data

Details

Takes the dataset as an argument and creates an HTML label that can be used as the annotation text in the leaflet map.

Value

Returns a string/HTML label with the right format for the columns LOCATION_NAME,EQ_PRIMARY,TOTAL_DEATHS as an annotation text in the leaflet map.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(magrittr)
readr::read_delim("signif.txt", delim = "\t") %>%
  eq_clean_data() %>%
  eq_location_clean() %>%
  dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>%
  dplyr::mutate(popup_text = eq_create_label(.)) %>%
  eq_map(annot_col = "popup_text")

## End(Not run)

mkaywins/Capstone_project documentation built on Feb. 24, 2020, 8:36 p.m.