eq_map: eq_map

Description Usage Arguments Value Examples

View source: R/eq_map.R

Description

This function plots a straightforward map using circles to determine the eartquake location. The radius of the circle is according to the magnitude (in Richter Scale) of the earthquake.

Usage

1
eq_map(df_map = rlang::.data, annot_col)

Arguments

df_map

A DataFrame with DATE, LONGITUDE, LATITUDE, and EQ_PRIMARY columns.

annot_col

The information to be displayed inside of the popup.

Value

A map with earthquakes as circles.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# Assuing the my_dataset has DATE, LONGITUDE, LATITUDE, and EQ_PRIMARY columns.
my_dataset %>% eq_map(annot_col = "DATE")

# Full example.
readr::read_delim("inst/extdata/signif.txt",
                 delim = "\t") %>%
                     eq_clean_data() %>%
                         dplyr::filter(COUNTRY == "MEXICO" &
                                       lubridate::year(DATE) >= 2000) %>%
                                           eq_map(annot_col = "DATE")
## End(Not run)

nandinigntr/MSDR documentation built on Jan. 1, 2021, 11:32 a.m.