geom_timeline: Geom function for creating the timeline from Earthquake data...

Description Usage Arguments Value Examples

View source: R/geom_timeline.R

Description

Geom function for creating the timeline from Earthquake data from NOAA

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
geom_timeline(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  xmin = as.Date("0001-01-01"),
  xmax = as.Date("2020-01-01"),
  ...
)

Arguments

mapping

set aesthetics

data

The data of which we want to make the timeline

stat

The statistics that you want to use

position

Position of the string

na.rm

If False, null value are removed

show.legend

Should layer have a legend or not

inherit.aes

Basically inherit the aesthetics or not

xmin

Providing the minimum date for the data to be plotted

xmax

Providing maximum date for the data to be plotted

...

Other arguments that can be passed

Value

This return the geom timeline

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(NOAA_data)
NOAA_data %>% eq_clean_data() %>%
dplyr::filter(Country %in% c("India", "Pakistan")) %>%
   ggplot(aes(x = date, y = Country, color = Total.Deaths, size = Mag,
              magnitude = Mag, label =Location_Name)) +
   labs(color="#deaths",size="Magnitude",x="DATE")+
   geom_timeline(alpha=0.2,xmin = ymd('2000-01-01'), xmax = ymd('2015-12-31'))+
  labs(x="DATE")+theme_minimal()

## End(Not run)

adeel1997/noaaquake documentation built on Dec. 18, 2021, 10:27 p.m.