## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>",
                      fig.width = 7, fig.height = 4.5, dev = "png")
has_figs <- file.exists("figures/ecdc_rates.png")

## ----design, eval = FALSE-----------------------------------------------------
# library(survinger)
# 
# # ecdc_surveillance is pre-processed from ECDC open data
# # See data-raw/process_ecdc.R for the reproducible processing script
# design <- surv_design(
#   data = ecdc_surveillance$sequences,
#   strata = ~ region,
#   sequencing_rate = ecdc_surveillance$population[c("region", "seq_rate")],
#   population = ecdc_surveillance$population
# )

## ----rates-plot, echo = FALSE, eval = has_figs, out.width = "100%"------------
knitr::include_graphics("figures/ecdc_rates.png")

## ----compare-plot, echo = FALSE, eval = has_figs, out.width = "100%"----------
knitr::include_graphics("figures/ecdc_compare.png")

## ----alloc-plot, echo = FALSE, eval = has_figs, out.width = "100%"------------
knitr::include_graphics("figures/ecdc_allocation.png")

## ----delay-plot, echo = FALSE, eval = has_figs, out.width = "100%"------------
knitr::include_graphics("figures/ecdc_delay.png")

## ----nowcast-plot, echo = FALSE, eval = has_figs, out.width = "100%"----------
knitr::include_graphics("figures/ecdc_nowcast.png")

## ----adjusted-plot, echo = FALSE, eval = has_figs, out.width = "100%"---------
knitr::include_graphics("figures/ecdc_adjusted.png")

