enw_plot_obs: Generic quantile plot

View source: R/plot.R

enw_plot_obsR Documentation

Generic quantile plot

Description

Generic quantile plot

Usage

enw_plot_obs(obs, latest_obs = NULL, log = TRUE, ...)

Arguments

obs

A data.frame of summarised posterior estimates containing at least a confirm count column and a date variable

latest_obs

A data.frame of observed data containing at least a confirm count variable and the same date variable as in the main data.frame used for plotting.

log

Logical, defaults to FALSE. Should counts be plot on the log scale.

...

Additional arguments passed to ggplot2::aes() must at least specify the x date variable.

Value

A ggplot2 plot.

See Also

Plotting functions enw_plot_nowcast_quantiles(), enw_plot_pp_quantiles(), enw_plot_quantiles(), enw_plot_theme(), plot.epinowcast()

Examples

nowcast <- enw_example("nowcast")
obs <- enw_example("obs")

# Plot observed data by reference date
enw_plot_obs(obs, x = reference_date)

# Plot observed data by reference date with more recent data
enw_plot_obs(nowcast$latest[[1]], obs, x = reference_date)

seabbs/epinowcast documentation built on Sept. 20, 2024, 2:39 a.m.