Description Usage Arguments Value Examples
View source: R/map_functions.R
The function eq_map
maps the epicenters of earthquakes and annotates
each point with a pop up window.
1 |
data |
A NOAA data frame with the columns LONGITUDE and LATITUDE of the earthquakes. |
annot_col |
The column of the data frame depicting the annotation of the earthquakes. |
The function outputs a map with epicenters of earthquakes as well as their annotations to the current graphics device.
1 2 3 4 5 6 7 8 9 10 11 | # import libraries
library(dplyr)
library(readr)
# set working directory
setwd(system.file("extdata", package = "noaa"))
# read and clean NOAA data
data <- readr::read_delim("signif.txt", "\t") %>%
eq_clean_data() %>%
dplyr::filter(COUNTRY == "MEXICO", YEAR > 2000)
# map and annotate NOAA data
eq_map(data, annot_col = "DATE")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.