eq_map: This maps the epicenters (LATITUDE/LONGITUDE) and annotates...

Description Usage Arguments Details Value Examples

View source: R/eq_map.R

Description

This 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

Usage

1
eq_map(mapdata, annot_col = "DATE")

Arguments

mapdata

A data frame with data obtained from NOAA website

annot_col

The name of the column from the data to be use for annotation

Details

After downloading, reading and cleaning the dataset from NOAA site, https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1. National Geophysical Data Center / World Data Service (NGDC/WDS): Significant Earthquake Database. National Geophysical Data Center, NOAA. The cleaning of the data frame is done with the eq_clean_data() function of this package. The function return a map of the earthquakes epicenters (LATITUDE/LONGITUDE) and annotates each point with in pop up window containing annotation data stored in a column of the cleaned data frame. The user is able to choose which column is used for the annotation in the pop-up with this function by using the argument named "annot_col". If the "annot_col" argument is not used, then the value of the "DATE" column is used. On the map, each earthquake is shown with a circle, and the radius of the circle is proportional to the earthquake's magnitude (EQ_PRIMARY).

Value

A map of the earthquakes epicenters and giving some annotations

Examples

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

## End(Not run)

vnmath/SoftwareDevinR documentation built on July 6, 2020, 9:36 a.m.