geom_timeline: geom_timeline ggplot2 geometry

Description Usage Value Examples

Description

This function create an ad hoc geometry to visualize the timeline of earthquakes. Each earthquake is represented by a point, with size and color aestethics ready to be assigned a variable.

Usage

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

Value

a ggplot2 geometry

Examples

1
2
3
4
5
6
7
8
## Not run: 
data %>%
dplyr::filter(COUNTRY == "USA" & YEAR > 2000) %>%
  ggplot() +
    geom_timeline(aes(x = DATE, y = COUNTRY, size = EQ_PRIMARY, color = DEATHS)) +
    labs(size = "Richter Scale value:", color = "# of Deaths:")

## End(Not run)

frenkg/coursera.eq documentation built on May 12, 2019, 1:04 p.m.