geom_timeline: Function to visualize of the timeline of the Earthquakes

Description Usage Arguments Value Examples

View source: R/Geom_Timeline.R

Description

Function to visualize of the timeline of the Earthquakes

Usage

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

Arguments

mapping

Set of aesthetic mappings created by aes() or aes_(). If specified and inherit.aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

data

A Dataframe

stat

The statistical transformation to use on the data for this layer, as a string.

position

Position adjustment, either as a string, or the result of a call to a position adjustment function.

na.rm

specifies how default missing values are approached

show.legend

logical. Should this layer be included in the legends? NA, the default, includes if any aesthetics are mapped. FALSE never includes, and TRUE always includes. It can also be a named logical vector to finely select the aesthetics to display.

inherit.aes

If FALSE, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. borders().

...

additional parameters

Value

A Plot of timeline of Earthquakes

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data = system.file('extdata', 'earthquakesData.tsv', package ='masteringSoftwareDevelopmentinR') %>%
data = read_data(data) %>%
eq_clean_data() %>%
dplyr::filter(datetime >= "1980-01-01" & datetime <="2014-01-01" & COUNTRY == c("BRAZIL"))%>%
ggplot() +
geom_timeline(aes(x = datetime, size = EQ_MAG_ML, color = DEATHS, fill = DEATHS))

## End(Not run)

SanjayShetty01/masteringSoftwareDevelopmentinR documentation built on Dec. 18, 2021, 12:57 p.m.