Skip to content

Workflow

Abhinav Tushar edited this page Jan 29, 2018 · 15 revisions

Building and deploying flusight is a three step process:

  1. Parse forecasts data in a form ingestible by flusight
  2. Build visualizer using yarn run build
  3. Host the files generated in ./dist

This document describes the the working of the first step for collecting data from CDC FluSight style csvs.

Parse Data

This step creates the following json data files in ./src/assets/data/ which are then used by the build step:

  1. Historical data file (history.json) containing true time series data for a few past seasons.
  2. Metadata file (metadata.json) containing data about US states, HHS regions etc.
  3. Score files (scores-<season-id|latest>) containing performance scores of the predictions.
  4. Main season files (season-<season-id|latest>) containing the predictions and other data for display in the main time chart view.
  5. Distribution files (distributions/season-<season-id|latest>-<region-id>.json) containing distributions information for the predictions to be displayed in the distribution view.

By default, the repository provides scripts to generate these data files using csv files in the CDC FluSight Challenge's format. For using this structure the csv files should be arranged in the directory ./data as season* → modelepidemic week with each model directory having a meta.yaml file with details about the submission. The meta.yaml should contain the following fields.

name: 'Name of the model'
description: 'Short description'
url: 'Team url'

The model id used for legend and tooltip display is taken from the directory name itself. A sample metadata file ./data/2015-2016/sent/meta.yaml (sent is its display id) could be like this:

title: 'Sentinel Model'
description: 'Baseline model from Cybertron'
url: 'http://tfwiki.net/wiki/Cybertron_(planet)'

Here is a sample structure for ./data:

.
|-- 2014-2015
|   |-- model-a
|   |   |-- 201441.csv
|   |   |-- 201444.csv
|   |   |-- 201501.csv
|   |   `-- meta.yaml
|   |-- model-b
|   |   |-- 201440.csv
|   |   |-- 201441.csv
|   |   `-- meta.yaml
|   `-- model-c
|       |-- 201440.csv
|       |-- 201441.csv
|       `-- meta.yaml
`-- 2015-2016
    |-- model-a
    |   |-- 201501.csv
    |   |-- 201502.csv
    |   `-- meta.yaml
    |-- model-b
    |   |-- 201501.csv
    |   |-- 201502.csv
    |   `-- meta.yaml
    `-- model-c
        |-- 201501.csv
        |-- 201502.csv
        `-- meta.yaml

Running yarn run parse will then perform the necessary transformations after collecting actual flu data using the delphi-epidata API to make the final jsons.

Clone this wiki locally