See geom_timeline_label
for description.
1 2 3 4 5 6 7 8 9 10 11 12 | library(dplyr); library(lubridate);library(ggplot2)
NOAA_quakes%>%
eq_clean_data()%>%
dplyr::filter(COUNTRY %in% c('CHINA','MEXICO')) %>%
dplyr::filter(DATE > '2010-01-01') %>%
ggplot2::ggplot() +
geom_timeline(aes(x = DATE, y = COUNTRY, size = as.numeric(EQ_PRIMARY),
color = as.numeric(TOTAL_DEATHS))) +
guides(size = guide_legend(order=1))+
scale_color_continuous(name = '# deaths') +
scale_size_continuous(name = 'Richter scale value') +
NOAA_thm()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.