geom_timeline_label: Visualization tool: geom_timeline_label

Description Usage Arguments Examples

View source: R/visualization tools.R

Description

Scripting geom_timeline_label function geom function aims to take nmax value of earthquakes as vertical line label

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
geom_timeline_label(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  n_max = 5,
  ...
)

Arguments

n_max

An integer (default = 5) max # of earthquakes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
ggplot(df, aes(x = Date, y = COUNTRY,
               color = as.numeric(TOTAL_DEATHS),
               size = as.numeric(EQ_PRIMARY),
               label = CLEAN_LOCATION_NAME)) +
  geom_timeline() +
  labs(size = "Richter scale value", color = "# deaths") +
  ggplot2::theme(panel.background = ggplot2::element_blank(),
        legend.position = "bottom",
        axis.title.y = ggplot2::element_blank()) + ggplot2::xlab("DATE") +
  geom_timeline_label(data=df)

## End(Not run)

dannyjwpark/NOAA documentation built on Dec. 31, 2020, 11:11 p.m.