eq_map: This function generates a leaflet map with circles at each...

Description Usage Arguments Value Examples

View source: R/leaflet_map.R

Description

This function generates a leaflet map with circles at each earthquake's location. Should be used with the output of eq_location_clean, but will work with any dataframe with DATE, LONGITUDE, LATITUDE and MAG columns.

Usage

1
eq_map(data, annot_col = "DATE")

Arguments

data

dataframe with DATE, LONGITUDE, LATITUDE and MAG columns.

annot_col

character vector, indicating the column containing 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
## Not run: 

# Full example.
eq_clean_data() %>%
      dplyr::filter(!is.na(TOTAL_DEATHS)) %>%
      dplyr::select(DATE, YEAR, COUNTRY, REGION, LONGITUDE, LATITUDE, MAG, TOTAL_DEATHS) %>%
      tidyr::drop_na() %>%
      dplyr::filter(COUNTRY == "MEXICO" & YEAR >= 2000) %>%
      eq_map()

## End(Not run)

rsizem2/noaa-earthquakes documentation built on Dec. 22, 2021, 7:17 p.m.