geom_timeline: Displays a timeline of Earthquakes

Description Usage Arguments Value See Also Examples

View source: R/geom_NOAA_timeline.R

Description

For a given (optional) selection of date range and countries. The resulting selection of earthquakes is represented by a circle along a time axis. Optional feature enable to add a vertical axis usualy country aesthetic y. Additional optional aesthetics fill an r enable the user to represent additional continuous variables such as nb of deaths or magnitude.

Usage

1
geom_timeline(data = NULL,mapping=NULL,xmin=NULL,xmax=NULL, countries= NULL,alpha=0.5)

Arguments

data

The data to be displayed in this layer. There are three options:

If NULL, the default, the data is inherited from the plot data as specified in the call to ggplot().

A data.frame, or other object, will override the plot data. All objects will be fortified to produce a data frame. See fortify() for which variables will be created.

A function will be called with a single argument, the plot data. The return value must be a data.frame, and will be used as the layer data. A function can be created from a formula (e.g. ~ head(.x, 10)).

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.

xmin

start date for data vizualisation [Character] encoded as YYYY-MM-DD or [Date]

xmax

end date for data vizualisation [Character] encoded as YYYY-MM-DD or [Date]

countries

[Character] list of Countries to filter

alpha

alpha parameter for transparency

Value

ggplot plot object

See Also

timeline_data geom_timeline_label relabel_legend

Examples

1
2
3
4
## Not run: 
ggplot(data=clean_data,aes(x=DATE,y=COUNTRY)) + geom_timeline()

## End(Not run)

BreizhZut/NOAAsignifEarthQuakes documentation built on Nov. 10, 2019, 3:45 p.m.