Description Usage Format Value Examples
This functions is the Geom in charge to creates the visuals. You do not need to use the geom_timeline to have the benefits of this function as you can see in the examples. Just uses the 'ggplot2::layer'.
1 |
An object of class GeomTimeline
(inherits from Geom
, ggproto
, gg
) of length 6.
Creates the visuals to be plotted by the geom_timeline.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
# Creating a Dataset.
df_example <- eq_clean_data(file_name = 'inst/extdata/signif.txt') %>%
dplyr::filter(YEAR > 2010,
COUNTRY %in% c("CHINA",
"JAPAN")) %>%
dplyr::select(DATE,
COUNTRY,
EQ_PRIMARY,
TOTAL_DEATHS,
LOCATION)
# Plotting using layer.
ggplot2::ggplot() +
ggplot2::layer(geom = GeomTimeline,
mapping = aes(x = df_example$DATE,
y = df_example$COUNTRY,
size = df_example$EQ_PRIMARY,
color = df_example$TOTAL_DEATHS),
data = df_example,
stat = 'identity',
position = 'identity',
show.legend = NA,
inherit.aes = TRUE,
params = list(na.rm = FALSE))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.