Options
All
  • Public
  • Public/Protected
  • All
Menu

flusight-csv-tools

Build Status npm npm

Node toolkit for CDC FluSight format CSVs. Full documentation here. Provides features for:

  1. Parsing CSVs (fct.Csv class)
  2. Verifying CSVs (fct.verify module)
  3. Scoring targets (fct.score module)
  4. Fetching true values (fct.truth module)
  5. Metadata related to CDC FluSight (fct.meta module)
  6. Utilities for working with
    • Bin distributions (fct.utils.bins module)
    • Time and epiweeks (fct.utils.epiweek module)

Quickstart

# Install from npm
npm i flusight-csv-tools
// Read a csv
const fct = require('flusight-csv-tools')
let csv = new fct.Csv('./test/data/sample.csv', 201720, 'model-name')

// Verify
fct.verify.verifyHeaders(csv)
fct.verify.verifyPoint(csv)
fct.verify.verifyProbabilities(csv)

// Score
fct.score.score(csv).then(d => ...)

Data representation

A CSV ingested by flusight-csv-tools uses the following standards for representing information:

  1. HHS Regions are referred to as nat (for 'US National') or hhs1, hhs2... for 'HHS Region 1', 'HHS Region 2' and so on.
  2. Week ahead targets are referred using 1-ahead, 2-ahead, 3-ahead and 4-ahead while seasonal targets are peak (peak wili value), peak-wk and onset-wk.
  3. A season 20xx-20yy is represented using a single number 20xx (the first year of a season).
  4. Weeks values are not represented by themselves but are always passed around as epiweeks like YYYYWW where YYYY is the year and WW is the week (MMWR week).
  5. An epidemic season 20xx contains all weeks in the set [20xx30, 20yy29], where 20yy = 20xx + 1.
  6. CSVs are scored using the latest available data and do not, as of yet, use the data available at the time the predictions were made.

Index

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc