aggregate_to_weekly()
|
Aggregate daily data to weekly data |
calc_cramers_dist_equal_space()
|
Approximate the Cramer’s distance between a pair of distributions
F and G that are represented by a collection of equally-spaced quantiles. |
calc_cramers_dist_one_model_pair()
|
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. |
calc_cramers_dist_unequal_space()
|
Approximate the Cramer’s distance between a pair of distributions
F and G that are represented by a collection of unequally-spaced quantiles. |
calc_forecast_week_end_date()
|
Calculate end date for the week a forecast was made. |
calc_submission_due_date()
|
Calculate the submission date that corresponds to a given forecast date |
calc_target_end_date()
|
Calculate end date for a forecast is targeting. |
calc_target_week_end_date()
|
Calculate end date for the week a forecast is targeting. |
covidHubUtils
|
covidHubUtils - Utility functions for the COVID-19 forecast hub |
date_to_datetime()
|
Create a datetime by appending time and/or UTC timezone
to the given date string, if necessary |
date_to_week_end_date()
|
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_raw_nytimes()
|
Download raw truth data from NYTimes and write to CSV files |
download_raw_usafacts()
|
Download raw truth data from USAFacts |
get_all_models()
|
Get all valid model names |
get_forecast_file_path()
|
Generate paths to forecast files submitted on a range of forecast dates from selected models |
get_hub_locations()
|
Create data/hub_locations.rda for loading data from zoltar and covidData |
get_model_designations()
|
Get model designations from metadata |
get_model_metadata()
|
Get Hub model metadata |
get_plot_forecast_data()
|
Combine load_truth() and pivot_forecasts_wider() |
get_truth_path()
|
Construct the file path to a truth file |
get_valid_target_list()
|
Create data/hub_targets_us.rda and data/hub_targets_ecdc.rda |
get_zoltar_project_url()
|
Get Zoltar project URL |
hub_locations hub_locations
|
Information on locations in the COVID-19 Forecast Hub |
hub_locations_ecdc
|
Available locations in the ECDC Hub |
hub_targets_ecdc
|
Available targets in the ECDC Hub |
hub_targets_us
|
Available targets in the US Hub |
join_with_hub_locations()
|
Add stored information about location name and population by joining the
data with the correct stored location data |
load_forecast_files_repo()
|
Read in a set of forecast files from a repository
without rows having NULLs in value column. |
load_forecasts()
|
Load all available forecasts submitted around forecast dates from Zoltar
or local hub repo. |
load_forecasts_repo()
|
Load all available forecasts submitted on forecast_dates from
a local clone of reichlab/covid19-forecast-hub repo. |
load_forecasts_zoltar()
|
Load all available forecasts submitted on forecast_dates from Zoltar. |
load_from_coviddata()
|
load truth data from covidData |
load_from_hub_repo()
|
load truth data from a local clone of forecast hub repo |
load_latest_forecasts()
|
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_latest_forecasts_repo()
|
Load the most recent forecasts of all that were submitted
on forecast_dates from a local clone of reichlab/covid19-forecast-hub repo. |
load_latest_forecasts_zoltar()
|
Load the most recent forecasts of all that were submitted
on forecast_dates from Zoltar. |
load_truth()
|
Load truth data under multiple target variables from multiple truth sources |
pivot_forecasts_wider()
|
Return a data frame of forecasts with predictive quantiles in columns. |
plot_forecast()
|
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()
|
Plot forecasts and optional truth for only one selected target variable. |
preprocess_hospitalization()
|
Preprocess raw hospitalization data into Cumulative/Incident hospitalizations and write to CSVs |
preprocess_jhu()
|
Preprocess raw truth data from JHU CSSE into Cumulative/Incident - Deaths/Cases and write to CSVs |
preprocess_nytimes()
|
Preprocess raw truth data from NYTimes into Cumulative/Incident - Deaths/Cases and write to CSVs |
preprocess_truth_for_zoltar()
|
Generate versioned truth data for zoltar for a specified target
It only includes national and state-level truth data. |
preprocess_usafacts()
|
Preprocess raw truth data from USAFacts into Cumulative/Incident - Deaths/Cases and write to CSVs |
preprocess_visualization_truth()
|
Preprocess raw truth data from JHU CSSE into Cumulative/Incident - Deaths/Cases for visualization
purpose and write to JSON files |
reformat_forecasts()
|
Reformat forecast data frame returned from zoltar query
This function will throw a warning and return an empty data.frame with
columns model , forecast_date , location , type , quantile and value , when
no forecasts are available in zoltar_query_result . |
save_truth_for_zoltar()
|
Generate the most up to date truth data for zoltar
and save the differences between the new version and old version.
It only includes national and state-level truth data. |
score_forecasts()
|
Score forecasts |
setup_zoltar_connection()
|
Set up Zoltar connection |