eq_map: Visualize earthquakes data on leaflet Map.

Description Usage Arguments Value Examples

Description

This function takes an argument data containing the filtered data frame with earthquakes to visualize. 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.

Usage

1
eq_map(data_eq, annot_col)

Arguments

data_eq

Filtered dataframe of NOAA earthquakes dataset

annot_col

Column name from dataset used for the annotation in the pop-up

Value

leaflet MAP shown with a circle markers, and the radius of the circle marker is proportional to the earthquake's magnitude.

Examples

1
2
3
4
5
6
7
8
## Not run: 
 eq_map(data_eq, annot_col = "DATE")

 data_eq %>%
       dplyr::filter(COUNTRY %in% COUNTRIES & lubridate::year(DATE) >= 2000) %>%
       eq_map(annot_col = "DATE")

## End(Not run)

garvish/earthquakes documentation built on May 16, 2019, 5:41 p.m.