Skip to contents

All functions

add_horizons()
Add columns indicating the horizon to the scores
benchmark_performance()
Benchmark performance of wastewater and hospital admissions model foreast runs
clean_and_filter_nwss_data()
Initial subsetting of NWSS data
clean_ww_data()
Clean wastewater data
cleanup_secrets()
Cleans up environment when secrets and API information is no longer needed
combine_and_summarize_ww_data()
Combine and summarize wastewater data across all forecast dates and locations
combine_hub_and_local_wis()
Combine the hosp only real-time scores and cfa real- time scores from github
combine_outputs()
Combine outputs
compute_relative_crps()
Compute relative CRPS
create_hub_submissions()
Create hub submission files
create_mock_submission_scores()
Create mock submission scores
date_of_ww_data()
Date of wastewater data
eval_fit()
Fit model for evaluation
eval_postprocess()
Postprocess model for evaluation.
exclude_hosp_outliers()
Exclude hospital outliers
flusight_location_table
flusight_location_table dataset
format_for_hub()
Format quantiles for the current COVID Forecast Hub
format_scores_for_comparison()
Format the hosp only real time scores for comparison to the other real time models
get_add_ww_metadata()
Get additional wastewater metadata
get_avg_scores_model_horizon()
Get avg of scores by horizon
get_box_plot()
Get box plot by date and scenario
get_convergence_df()
Get convergence dataframe
get_date_locs_excluded()
Get forecast date locations that we excluded in the model run
get_diagnostic_flags()
Get diagnostic flags
get_epidemic_phases_from_rt()
Get epidemic phases from R(t)
get_filepath()
Get filepath
get_full_scores()
Get the scores for ever day for a particular location and forecast date
get_growth_rate_plot()
Compare growth rates in wastewater and hospital admissions data
get_heatmap_metadata()
Get a heatmap of the metadata of reasons for excluding forecasts from analysis
get_heatmap_metadata_hub()
Get a heatmap of the metadata of Hub models submitted
get_heatmap_relative_wis()
Get heatmap of relative WIS
get_heatmap_scores()
Get heatmap of scores by scenario
get_ind_forecast_score()
Get an individual forecast score summary for a particular forecast date and location
get_input_hosp_data()
Get input hospital admissions data
get_input_ww_data()
Get input wastewater data
get_last_hosp_data_date()
Get last hospital admissions data point date
get_last_hosp_data_date_map()
Get a map of the location, forecast date, and last hospital admissions data date
get_loc_rel_crps()
Get the relative mean crps for a location
get_model_draws_w_data()
Get model draws combined with input and evaluation data
get_model_path()
Get model path
get_n_states_improved_plot()
Get bar chart of the number of states improved compared to without wastewater over each forecast date
get_plot_bias_over_time()
Get a plot of bias over time
get_plot_comb_perf_heatmap()
Plot a heatmap of the avg forecast performance by locations and forecast date for the head-to-head comparison
get_plot_hosp_data_comparison()
Get plot of hospital admissions data compared to model draws
get_plot_hub_perf_heatmap()
Plot a heatmap of the avg forecast performance by locations and forecast date for the Hub submissions
get_plot_hub_performance()
Get plot of overall hub performance
get_plot_quantile_comparison()
Get plot quantile comparison
get_plot_raw_scores()
Get plot raw scores
get_plot_rel_crps_distrib()
Get a density plot of the relative CRPS distribution
get_plot_rel_crps_heatmap()
Plot a heatmap of the relative crps by locations and forecast date for the head-to-head comparison
get_plot_rel_wis_distrib()
Get a density plot of the relative WIS distribution
get_plot_score_by_horizon_t()
Get plot of scores by horizon over time
get_plot_scores_w_data()
Get plot scores with evaluation data overlaid
get_plot_summarized_scores()
Get plot summarized scores
get_plot_theme()
Get standardized plot theme to add to figures
get_plot_wis_over_time()
Get plot of WIS over time
get_plot_ww_data_comparison()
Get plot of wastewater data compared to model draws
get_qq_plot()
Get quantile-quantile plot
get_raw_output_suffix()
Generate a standard format output suffix for saving raw output for a location/forecast date/scenario trio.
get_rel_wis_all_time()
Get the relative wis from the hub formatted
get_rel_wis_real_time()
Get the relative wis for the real time scores
get_scenario_site_ids()
Get scenario site ids
get_scores_from_quantiles()
Get the scores for every day for a location, forecast date, and scenario from the quantiles during the forecast period
get_secret()
Interface for getting information needed for API interfacing
get_state_level_quantiles()
Get quantiles for state-level generated quantities
get_state_level_ww_quantiles()
Get quantiles for site-lab level wastewater
get_stats_imp_forecasts_wis()
Get stats on number of improved forecasts in real time from wis
get_stats_improved_forecasts()
Get stats on number of improved forecasts
get_summary_metadata()
Get a summary table of the number of forecasts excluded for each reason
get_summary_table_fig3()
Get a summary of a single states crps
get_summary_ww_table()
Get wastewater data summary tables
get_table_sufficient_ww()
Get table of location-forecast dates with sufficient wastewater
get_ww_data_flags()
Get table of location-forecast dates with sufficient wastewater
load_data_and_summarize()
Load data and summarize metadata
loc_abbr_to_flusight_code()
Convert a two-letter location abbreviation to a two-character FluSight location code
make_baseline_score_table()
Make baseline score table
make_df()
Make dataframe
make_fig2()
Make figure 2
make_fig2_ct()
Make concentration fit and forecast figure
make_fig2_ct_supp()
Make concentration fit and forecast figure for supplement
make_fig2_hosp_t()
Make a plot comparing the fit and forecasted hospital admissions from the wastewater and hospital admissions model for a few example states
make_fig3()
Title
make_fig3_crps_underlay_fig()
Make CRPS underlay figure
make_fig3_forecast_comp_fig()
Make hospital forecast comparison figure
make_fig3_single_loc_comp()
Make head to head CRPS distribution comparison plot for a single location
make_fig4()
Make Figure 4
make_fig4_admissions_overall()
Make a figure of overall admissions for context
make_fig4_avg_crps_over_time()
Plot average CRPS over time for model comparison
make_fig4_avg_wis_over_time()
Plot average WIS over time for model comparison
make_fig4_heatmap_rel_wis()
Get a plot of the relative wis from the real-time models
make_fig4_pct_better_w_ww()
Make a figure of the percent of locations with a better forecast with ww over time
make_fig4_rel_crps_by_location()
Make figure that stratifies scores by location across forecast dates
make_fig4_rel_crps_by_phase()
Make figure that plots distribution of relative crps stratified by epidemic phase
make_fig4_rel_crps_over_time()
Make a CRPS density plot for a subset of locations
make_fig4_rel_crps_overall()
Make figure that stratifies across location and forecast dates
make_fig4_rel_wis_by_location()
Make figure that stratifies scores by location across forecast dates
make_fig4_rel_wis_over_time()
Make a CRPS density plot for a subset of locations
make_fig4_results_table()
Make a summary of the with and without wastewater comparison scores
make_fig5()
Make Fig 5
make_fig5_average_wis()
Get plot of WIS over time
make_fig5_bar_chart()
Make plot of WIS scores in Hub models overall
make_fig5_density_rank()
Make a figure of the distribution of standardized WIS rank
make_fig5_heatmap_relative_wis()
Make a heatmap of relative WIS across locations
make_fig5_hub_performance()
Get plot of overall hub performance, grouped by period
make_fig5_qq_plot()
Make a quantile quantile plot for the Hub
make_fig5_table_and_plot()
Make summary table of WIS scores in Hub models overall
make_plot_coverage_range()
Plot coverage at specified ranges
make_qq_plot_overall()
Make a qq plot
make_sfig_crps_by_phase()
Make figure that plots distribution of absolute crps stratified by epidemic phase
nhsn_soda_query()
Construct a Socrata open data API (SODA) query for the NSHN dataset
order_horizons()
Get the order of the categorical horizons for plotting
order_locations()
Get the order of the locations for plotting
order_periods()
Get the order of the time periods for plotting
order_phases()
Get the order of the categorical horizons for plotting
plot_benchmarks()
Plot benchmark summaries
plot_components()
Get plot components (colors for now)
plot_quantiles()
Plot a timeseries of quantiles
postprocess_successful_fit()
Postprocess a successful eval fitting job.
pull_and_write_hosp_data()
Pull and save the current state of NHSN data on HealthData.gov
pull_nhsn()
Pull NHSN data from HealthData.gov
query_and_select_models()
Query Zoltar for models to include in the analysis
save_table()
Save table
score_hub_submissions()
Score hub submissions
score_real_time_outputs()
Load in and score the real-time outputs
setup_secrets()
Handles values needed to retrieve data from APIs to run pipeline
soql_is_in()
Return a soql::soql_where() construct for a given column being in a list of values
summarize_std_rank()
Summarize standardize rank with medians and 25th,75th percentiles
to_rds_with_suffix()
Save an object to .rds in a given output_dir, with programmatic naming.
trajectories_to_quantiles()
Aggregate individual trajectory timeseries or forecasts to quantile timeseries or forecasts