All functions |
|
---|---|
Aggregate daily data to weekly data |
|
Add reference dates and relative horizons to a dataframe of forecasts |
|
Internal function that add reference dates and relative horizons to a dataframe of forecasts. This function requires that the forecasts data frame contains only forecasts one temporal_resolution, i.e., only at the daily resolution or the weekly resolution. |
|
Reformat model outputs stored as a |
|
Approximate the Cramer’s distance between a pair of distributions F and G that are represented by a collection of equally-spaced quantiles. |
|
Calculate the approximated Cramer’s distance between a pair of distributions F and G that are represented by a collection of quantiles using a specific approximation rule. |
|
Approximate the Cramer’s distance between a pair of distributions F and G that are represented by a collection of unequally-spaced quantiles. |
|
Calculate end date for the week a forecast was made. |
|
Calculate the submission date that corresponds to a given forecast date |
|
Calculate end date for a forecast is targeting. |
|
Calculate end date for the week a forecast is targeting. |
|
covidHubUtils - Utility functions for the COVID-19 forecast hub |
|
Create a datetime by appending time and/or UTC timezone to the given date string, if necessary |
|
Calculate the date of the Saturday that ends the MMWR epidemic week for the given date,offset a specified number of epidemic week from a specified date |
|
Download historical raw truth data from NYTimes and write to CSV files. Note: updates to the NYTimes data stopped in March 2023. |
|
Get all valid model names |
|
Generate paths to forecast files submitted on a range of forecast dates from selected models |
|
Create data/hub_locations.rda for loading data from |
|
Get model designations from metadata |
|
Get forecast submission history of a specified model from local zoltar sqlite file |
|
Get Hub model metadata |
|
Get id and abbrevations of all models available in a specified project from local zoltar sqlite file |
|
Combine |
|
Construct the file path to a truth file |
|
Create data/hub_targets_us.rda and data/hub_targets_ecdc.rda |
|
Get Zoltar project id from local zoltar sqlite file |
|
Get Zoltar project URL |
|
Information on locations in the COVID-19 Forecast Hub |
|
Available locations in the ECDC Hub |
|
Available locations in the FluSight Hub |
|
Available targets in the ECDC Hub |
|
Available targets in the FluSight Hub |
|
Available targets in the US Hub |
|
Add stored information about location name and population by joining the data with the correct stored location data |
|
Read in a set of forecast files from a repository without rows having NULLs in value column. |
|
Load all available forecasts submitted around forecast dates from Zoltar, local Zoltar module or local hub repo. |
|
Load all available forecasts submitted on |
|
Load all available forecasts submitted on |
|
Load all available forecasts submitted on |
|
load truth data from covidData |
|
load truth data from a local clone of forecast hub repo |
|
Load covid forecasts from local hub repo or Zoltar. Return the most recent forecast from each model within forecast_date_window_size days of the last_forecast_date |
|
Load the most recent forecasts of all that were submitted
on |
|
Load the most recent forecasts of all that were submitted
on |
|
Load truth data under multiple target variables from multiple truth sources |
|
Get FIPS or CBSA codes from county or metropolitan area locations |
|
Return a data frame of forecasts with predictive quantiles in columns. |
|
Plot forecasts and optional truth for only one selected target variable. Faceted plots for multiple models, locations and forecast dates are supported with specified facet formula. |
|
Plot forecasts and optional truth for only one selected target variable. |
|
Preprocess raw hospitalization data into Cumulative/Incident hospitalizations and write to CSVs |
|
Preprocess historical raw truth data from JHU CSSE into Cumulative/Incident - Deaths/Cases and write to CSVs. Note: updates to the JHU CSSE data stopped in March 2023. |
|
Preprocess raw truth data from NYTimes into Cumulative/Incident - Deaths/Cases and write to CSVs. Note: updates to the NYTimes data stopped in March 2023. |
|
Preprocess raw truth data from JHU CSSE into Cumulative/Incident - Deaths/Cases for visualization purpose and write to JSON files. Note: updates to the JHU CSSE data stopped in March 2023. |
|
Reformat forecast data frame returned from zoltar query
This function will throw a warning and return an empty data.frame with
columns |
|
Score forecasts |
|
Set up Zoltar connection |