Description Usage Arguments Value Examples
View source: R/timeline_plot.R
Wrapper for creating a GeomTimeline
layer for ggplot2. See GeomTimeline
.
1 2 3 4 5 6 7 8 9 10 |
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 |
A ggplot2 layer containing a GeomTimeline
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
# All deadly earthquakes in JAPAN, CHINA and NEPAL since 2000
data <- eq_clean_data() %>%
dplyr::filter(!is.na(TOTAL_DEATHS)) %>%
dplyr::select(DATE, YEAR, COUNTRY, REGION, LONGITUDE, LATITUDE, MAG, TOTAL_DEATHS) %>%
tidyr::drop_na() %>%
dplyr::filter(YEAR > 1999, COUNTRY %in% c("JAPAN", "CHINA","NEPAL")) %>%
ggplot2::ggplot(aes(x = DATE,
y = COUNTRY,
size = MAG,
color = TOTAL_DEATHS)) +
geom_timeline()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.