Description Usage Arguments Examples
This geom plots labels with a certain number of largest (by size) earthquake on a timeline.
The timeline is created by geom_timeline
1 2 3 |
mapping |
The mapping |
data |
The data |
stat |
The stat |
position |
The position |
na.rm |
The na |
n_max |
The number of the largest earthquakes to be labelled |
show.legend |
The legend |
inherit.aes |
The aesthetics |
... |
Et all |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
data %>% eq_clean_data() %>%
filter(COUNTRY %in% c("CHINA", "USA"), YEAR > 2000) %>%
ggplot(aes(x = DATE, y = COUNTRY, colour = TOTAL_DEATHS, size = EQ_PRIMARY)) +
geom_timeline() +
geom_timeline_label(aes(label = LOCATION_NAME), n_max = 5) +
theme_timeline() +
labs(size = "Richter scale value", colour = "# deaths")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.