geom_timeline_label: Time line labels of earthquakes

Description Usage Arguments Examples

View source: R/main.R

Description

This geom for adding annotations to the earthquake data. This geom adds a vertical line to each data point with a text annotation (e.g. the location of the earthquake) attached to each line

Usage

1
2
3
geom_timeline_label(mapping = NULL, data = NULL, stat = "identity",
  position = "identity", ..., na.rm = FALSE, n_max = NULL,
  show.legend = NA, inherit.aes = TRUE)

Arguments

n_max

An integer. number of earthquakes, where we take the n_max largest (by magnitude) earthquakes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
data %>% eq_clean_data() %>%
dplyr::filter(Date >= "1980-01-01" & Date <="2014-01-01" & COUNTRY == c("ITALY","USA", "JORDAN")) %>%
  ggplot(aes(x = Date,
             y = COUNTRY,
             color = DEATHS,
             size = EQ_MAG_ML
  )) +
  geom_timeline() +
  geom_timeline_label(aes(label = LOCATION_NAME), n_max = 5) +
  theme_timeline()


## End(Not run)

daferpe/CapstonePackage documentation built on May 26, 2019, 2:35 a.m.