Skip to contents

Get input hospital admissions data

Usage

get_input_hosp_data(
  forecast_date_i,
  location_i,
  hosp_data_dir,
  calibration_time,
  for_eval = FALSE,
  load_from_epidatr = FALSE,
  population_data_path = NA
)

Arguments

forecast_date_i

The forecast date for this iteration

location_i

The location (state) for this iteration

hosp_data_dir

A string indicating the path to the directory containing time stamped hospital admissions datasets

calibration_time

A numeric indicating the duration of model calibration (based on the last hospital admissions data point)

for_eval

A boolean indicating whether the hospital admissions data is for evaluation. Default is FALSE which means it will be used to fit a single model, TRUE means we will combine with multiple locations and a longer time span than we would fit to.

load_from_epidatr

boolean indicating whether or not the hospital admissions datasets should be loaded directly from epidatr. default = FALSE because we are assuming that we have already created a folder with time stamped datasets

population_data_path

path to a table of state populations, default is NULL, only needed if pulling from epidatr

Value

a tibble containing the preprocessed hospital admissions data ready to be passed into the wwinference function