R/plot_predicted_prevalence.r

Defines functions plot_predicted_prevalence

Documented in plot_predicted_prevalence

##' Plot infection prevalence as predicted by EpiNow2
##'
##' @return ggplot object
##' @importFrom EpiNow2 calc_summary_measures
##' @param counties counties to plot, including the possibilities of "pilot" (for all pilot counties), "non-pilot" (for all non-pilot counties) and "all"
plot_predicted_prevalence <- function(counties = NULL) {
  prev <- prevalence.samples
  if (!is.null(counties)) {
    prev <- prev %>%
      filter(county %in% counties)
  }

  prev_summary <- calc_summary_measures(prev[, value := prev_ratio],
                                        summarise_by = "county",
                                        CrIs = 0.95)
}
epiforecasts/covid19.slovakia.mass.testing documentation built on March 2, 2021, 12:05 a.m.