context("Test file for theme_timeline()")
require(magrittr)
df <- system.file("extdata", "earthquakes.tsv", package = "NOAAearthquake")
df1 <- eq_clean_data(df)
df2 <- eq_location_clean(df1) %>%
dplyr::filter(Country %in% c("Mexico", "Turkey"), lubridate::year(Date) > 2000) %>%
ggplot2::ggplot(ggplot2::aes(x = Date, y = Country, color = `Total Deaths`, size = `Mag`)) +
geom_timeline()
test_that("theme_timeline returns ggplot object", {
gt <- df2 + theme_timeline()
testthat::expect_that(gt, is_a("ggplot"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.