eq_map: Visualize earthquakes on a map

Description Usage Arguments Examples

Description

The function takes an argument eq_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. The user is able to choose which column to use for the annotation in the pop-up with a function argument named annot_col. Each earthquake is shown with a circle whose radius is proportional to the earthquake's magnitude.

Usage

1
eq_map(eq_data, annot_col)

Arguments

eq_data

A data frame containing earthquake related data.

annot_col

The column name which should be used for annotation purpose

Examples

1
2
3
4
5
library(dplyr)
file_read() %>%
  eq_clean_data() %>%
  dplyr::filter(COUNTRY == "CHINA" & lubridate::year(DATE) >= 2000) %>%
  eq_map(annot_col = "DATE")

Valentin-Konoshenko/Earthquakes4Coursera documentation built on May 23, 2019, 1:08 p.m.