context('geom_timeline_label')
test_that('geom_timeline_label', {
plot1 <- NOAA_quakes%>%eq_clean_data()%>%
dplyr::filter(COUNTRY %in% c('MEXICO','JAPAN')) %>%
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)))
expect_length(unique(layer_data(plot1)$y),2)
expect_s3_class(plot1, 'ggplot')
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.