eq_map: Creating an interactive map of the epicenters from NOAA...

Description Usage Arguments Details Value Examples

View source: R/eq_map.R

Description

Creating an interactive map of the epicenters from NOAA eqrthquake data

Usage

1
eq_map(df_map, annot_col = "DATE")

Arguments

df_map

data frame. a cleaned data frame containing NOAA eqrthquake information

annot_col

character. to specify the column which should be shown as an annotation in the leaflet map

Details

This function returns an interactive map of the NOAA eqrthquake data. The epicenters constructed with the longitude- and lattitude information from the cleaned NOAA data frame. It is possible to change the column, which should represent the annotation in the pop-up text in the map (default is set to DATE). The size of the circle represents the magnitude of the earthquake and is specified by the column: EQ_PRIMARY from the NOAA data set.

Value

Returns an interactive HTML-map of the earthquake epicenters.

Examples

1
2
3
4
5
6
7
8
9
# the data first has to be cleaned by the function eq_clean_data
## Not run: 
library(magrittr)
readr::read_delim("signif.txt", delim = "\t") %>%
eq_clean_data() %>%
  dplyr::filter(COUNTRY == "USA" & lubridate::year(DATE) >= 1990) %>%
  eq_map(annot_col = "DATE")

## End(Not run)

mkaywins/Capstone_project documentation built on Feb. 24, 2020, 8:36 p.m.