Read in a set of forecast files from a repository without rows having NULLs in value column.

load_forecast_files_repo(
  file_paths,
  locations = NULL,
  types = NULL,
  targets = NULL,
  hub = c("US", "ECDC", "FluSight")
)

Arguments

file_paths

paths to csv forecast files to read in. It is expected that the file names are in the format "*YYYY-MM-DD-<model_name>.csv".

locations

a vector of strings of fips code or CBSA codes or location names, such as "Hampshire County, MA", "Alabama", "United Kingdom". A US county location names must include state abbreviation. Default to NULL which would include all locations with available forecasts.

types

Character vector specifying type of forecasts to load: "quantile" and/or "point". Default to all valid forecast types.

targets

character vector of targets to retrieve, for example c('1 wk ahead cum death', '2 wk ahead cum death'). Default to NULL which stands for all valid targets.

hub

character vector indicating the hub from which to load forecasts. Possible options are "US", "ECDC" and "FluSight".

Value

data frame with columns model, forecast_date, location, horizon, temporal_resolution, target_variable, target_end_date, type, quantile, value, location_name, population, geo_type, geo_value, abbreviation

Details

The model_name in the file name will be used for the value of the model column in the return result.