Description Usage Arguments Value Examples
View source: R/eq_create_label.R
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
1 | eq_create_label(Data)
|
Data |
A cleaned NOAA data frame |
eq_create_label returns a data frame of text to be displayed in pop up windows when used with eq_map.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.