geom_timeline: Timeline geom to visualize NOAA earthquakes data

Description Usage Arguments Value Examples

View source: R/NOAAviz.R

Description

Timeline geom to visualize NOAA earthquakes data

Usage

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

Arguments

mapping

aesthetic mappings

data

The datafram to create a timeline for

stat

The stat to transform the data with, by default "identity"

position

Adjusts the position of the layer in the grob

na.rm

If FALSE, the default, missing values are removed with a warning. If TRUE, missing values are silently removed.

show.legend

Display legends

inherit.aes

Should the aes be inherited

...

Other args

Value

a ggplot timeline object for plotting a timeline

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
paste0("https://www.ngdc.noaa.gov/",
       "nndc/struts/results?type_0=Exact&",
       "signif.txtquery_0=$ID&t=101650&s=13&",
       "d=189&dfn=signif.txt") %>%
    readr::read_delim(delim = "\t") %>%
    eq_clean_data() %>%
    dplyr::filter(lubridate::year(DATE) >= 2000,
                  COUNTRY == "MEXICO") %>%
    ggplot2::ggplot(aes(x = DATE)) +
    geom_timeline()

## End(Not run)

jdallmann/NOAAviz documentation built on Nov. 4, 2019, 2:35 p.m.