Description Usage Arguments Value Examples
This function plots earthquakes from data
generated by U.S. National Oceanographic and Atmospheric Administration
(NOAA) database on the map. The function maps the epicenters
(LATITUDE/LONGITUDE) and annotates each point with in pop up window
containing annotation data stored in a column of the data frame.
1 |
data |
A preproccessed tibble (data.frame) of NOAA earthquakes dataset |
annot_col |
column used for the annotation in the pop-up |
This function returns a ggplot
1 2 3 4 | library(dplyr)
NOAA_clean_data = eq_clean_data("https://www.ngdc.noaa.gov/nndc/struts/results?type_0=Exact&query_0=$ID&t=101650&s=13&d=189&dfn=signif.txt")
NOAA_clean_data %>% dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>% eq_map(annot_col = "DATE")
NOAA_clean_data %>% dplyr::filter(COUNTRY == "MEXICO" & lubridate::year(DATE) >= 2000) %>% dplyr::mutate(popup_text = eq_create_label(.)) %>% eq_map(annot_col = "popup_text")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.