update_obs_availability: Update observations based on availability

View source: R/data-scenarios.R

update_obs_availabilityR Documentation

Update observations based on availability

Description

Update observations based on availability

Usage

update_obs_availability(obs, cases_lag, seq_lag)

Arguments

obs

A data.frame with the following variables: date, cases, seq_voc, and seq_total, cases_available, and seq_available. seq_available and case_available must be uniquely define data rows but other rows can be duplicated based on data availability. This data format allows for multiple versions of case and sequence data for a given date with different reporting dates. This is important when using the package in evaluation settings or in real-time where data sources are liable to be updated as new data becomes available. See germany_covid19_delta_obs for an example of a supported data set.

cases_lag

Number of weeks that case data takes to be reported. Defaults to not alter the input data.

seq_lag

Number of weeks that sequence data takes to be reported. Defaults to not alter the input data.

Value

A data.frame of observations with updated case and sequence availability dates.

See Also

Functions to define and create data scenarios define_scenarios(), generate_obs_scenario()

Examples

update_obs_availability(
  germany_covid19_delta_obs,
  cases_lag = 2, seq_lag = 3
)

epiforecasts/forecast.vocs documentation built on May 14, 2023, 2 p.m.