eq_timeline: Create a timeline plot of earthquakes quickly

Description Usage Arguments Value Examples

Description

This function facilitates creating an earthquake timeline plot with or without location labels using a custom theme.

Usage

1
eq_timeline(dataset, xmin = NA, xmax = NA, label = FALSE)

Arguments

dataset

A data frame of earthquake data, as returned by eq_clean_data.

xmin

A date object giving a lower bound for the dates represented in the plot. If xmin is set, the dataset is subsetted to exclude dates before xmin.

xmax

A date object giving an upper bound for the dates represented in the plot. If xmax is set, the dataset is subsetted to exclude dates after xmax.

label

A Boolean indicating whether labels showing the local location of the earthquake should be included in the plot.

Value

This function creates an an earthquake timeline plot where the fill color represents the total number of deaths and the point size represents the magnitude.

Examples

1
2
3
4
eq_data <- eq_clean_data("NOAA_earthquakes.txt")
eq_data <- subset(eq_data, Country == "Mexico" & YEAR >= 2000)

eq_timeline(dataset=eq_data, label=TRUE)

lmitchell4/earthquake documentation built on May 29, 2019, 3:42 a.m.