Add a new target to the hub - reichlab/covid19-forecast-hub GitHub Wiki

This page is a step-by-step guide to add a new target to the hub.

1. Data Validation.

  • Make sure the targets can be accepted with the PR validation script here.
  • Also check if any new metadata checks need to be added here.

2. Zoltar integration

Once we have the PR validation script setup, we need to make sure it can be uploaded to Zoltar.

  • Make sure you add the new targets to the COVID_TARGETS variable in this file in zoltpy.
  • If there are more quantiles to be added for the new target, you can add it here.

3. Ground truth data.

If the new target has to be added to the visualization, the ground truth data should be recorded. Otherwise, you ignore this step.

  • You can add the code for creating the truth to the existing script in the get-truth-data.py.

4. Visualization

If the new target should be added to the visualization, follow this step. This step is not required if it isn't being added to the visualization.

  • Add the target to the target_cats list in meta.js.
  • Update the covid-csv-tools package to handle the new target. Specifically, update the parseCsv method in csv.js.
  • Also add the target id mappings in the meta.js file in the covid-csv-tools package. This file is different from the meta.js file in the first step.
  • Finally, add the target to the SEASONS variable in parse.js. This should be the same name as the directory name used to save the truth data.
  • Link the JSON data files generated to the visualization in data.js and add it to the export here
  • Add the data to the initialization script in actions.js.

Example

See this PR for a reference to how to add a new target to the visualization.