Description Usage Arguments Details Value Examples
geom_timeline() makes a ggplot2::Geom with timeline and special marks for an earthquakes, occured in the defined by user date interval. User must specify the following parameters: begin date; end date; column in data with earthquakes date to use; column in data with earthquakes magnitude to use, column in data with earthquakes deaths to use.
1 2 3 |
mapping |
ggplot parameter |
data |
Earthquake data in the dataframe in format of NOAA earthquakes database (Dataframe), mandatory. |
stat |
ggplot parameter |
position |
ggplot parameter |
na.rm |
ggplot parameter |
show.legend |
ggplot parameter |
inherit.aes |
ggplot parameter |
... |
other ggplot parameter The folloing parameters must be passed as parameters of aesthetic: xmindate Minimal date of the considering time frame (Date), mandatory. xmaxdate Maximum date of the considering time frame (Date), mandatory. event_date Date of earthquake, usually name of the column in data (Date), mandatory. richter Richter's magnitude of earthquakes, usually name of the column in data (numeric), mandatory. death Deaths produced by earthquakes, usually name of the column in data (numeric), mandatory. colour Main colour of earthquakes marks (colour name), optional scale Scale of earthquakes marks, coefficient (numeric), optional transparency Transparency of earthquakes marks (numeric, (0..1)), optional layers Groping of earthquakes marks by some parameters, e.g. COUNTRY, optional |
See other parameters below.
timeline geom (ggplot2 object)
1 2 3 4 5 6 7 8 9 10 11 12 | ggplot2::ggplot() +
theme_void() +
geom_timeline(data = earthquakes, aes(event_date = DATE,
xmindate = 2000,
xmaxdate = 2010,
richter = EQ_PRIMARY,
death = DEATHS,
transparency = 0.3,
colour = "red",
scale = 0.5,
layers = COUNTRY))+
theme(legend.position="none")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.