Description Usage Arguments Value Examples
This method enchances the plot timeline function by labelling points.
By default, it will label the top 5 points. This is specified in the n_max
parameter.
The column to label the points is in the label
parameter.
1 2 3 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
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 |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
other arguments passed on to |
This function returns a graphic object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(dplyr)
library(ggplot2)
library(readr)
raw_data<-readr::read_tsv(system.file("extdata", "signif.txt", package = "RCapstone"))
eq_clean_data(raw_data) %>% eq_location_clean() %>%
dplyr::filter(!is.na(EQ_PRIMARY), !is.na(DEATHS)) %>%
ggplot2::ggplot() +
ggplot2::aes(
x = DATE,
size = EQ_PRIMARY,
colour = DEATHS,
label=LOCATION_NAME
) +
geom_timeline() +
geom_timeline_label()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.