Description Usage Arguments Details Examples
Actual function that draw the earthquake timeline
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 |
In a typical use case, the user should specify the DATE as the x aesthetic, a grouping, e.g country for y, and 2 other measurements for color and size, e.g. TOTAL_DEATHS and EQ_PRIMARY (earthquake maginitude).
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
read_eq_clean_data() %>%
dplyr::filter(YEAR > 2000 & !IS_BC & COUNTRY %in% c("USA", "CANADA")) %>%
dplyr::mutate(TOTAL_DEATHS = as.numeric(TOTAL_DEATHS),
EQ_PRIMARY = as.numeric(EQ_PRIMARY)) %>%
ggplot2::ggplot(ggplot2::aes(x = DATE,
y = COUNTRY,
color = TOTAL_DEATHS,
size = EQ_PRIMARY
)) +
geom_timeline()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.