Description Usage Arguments Details Examples
geom_timeline
is used to visualize earthquake occurence, intensity,
the number of deaths caused, and other parameters.
1 2 |
mapping |
mapping |
data |
data |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
na.rm |
remove NAs |
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()]. |
... |
other parameter |
It uses the following additional parameters:
a date. The lower bound of the date interval used for subsetting the NOAA data.
a date. The upper bound of the date interval used for subsetting the NOAA data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data("eq_data")
ggplot() +
geom_timeline(data = eq_data %>% filter(COUNTRY == "ITALY"),
aes(x = DATE, size = EQ_PRIMARY, color = TOTAL_DEATHS,
xmin = as.Date('1950-01-01'),
xmax = as.Date('2015-01-01'))) +
theme_eq
data("eq_data")
ggplot(data = eq_data %>% filter(COUNTRY %in% c('COLOMBIA', 'MEXICO', 'USA')),
aes(x = DATE, y = COUNTRY, size = EQ_PRIMARY,
color = TOTAL_DEATHS, xmin = as.Date('1970-01-01'),
xmax = as.Date('2015-01-01'))) +
geom_timeline_label(aes(label = as.character(DATE)), nmax = 2) +
geom_timeline() +
theme_eq
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.