eq_create_label: Create a Leaflet map widget for earthquakes with location,...

Description Usage Arguments Value Examples

View source: R/eq_create_label.R

Description

This function takes a filtered data frame and maps the epicenters and annotates each point with a pop up window of location, magnitude and number of deaths

Usage

1

Arguments

Data

A cleaned NOAA data frame

Value

eq_create_label returns a data frame of text to be displayed in pop up windows when used with eq_map.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
Countries <- c('USA', 'CHINA')
XMin <- lubridate::ymd('2000-01-01')
readr::read_delim(system.file("extdata", "signif.txt", package = "TheCapstoneProject"), delim = '\t') %>%
eq_clean_data() %>%
eq_location_clean() %>%
dplyr::filter(COUNTRY %in% Countries) %>%
dplyr::filter(DATE >= XMin) %>%
dplyr::mutate(popup_text = eq_create_label(.)) %>%
eq_map(Text4Popup = "popup_text")

## End(Not run)

ekawabata/TheCapstoneProject documentation built on June 27, 2020, 7:58 a.m.