Options
All
  • Public
  • Public/Protected
  • All
Menu

Module for working with truth related data

Index

Variables

BASELINE_URL

BASELINE_URL: "https://raw.githubusercontent.com/cdcepi/FluSight-forecasts/master/wILI_Baseline.csv" = "https://raw.githubusercontent.com/cdcepi/FluSight-forecasts/master/wILI_Baseline.csv"

Url for fetching baseline data from

Functions

downloadBaseline

  • downloadBaseline(cacheFile: string): Promise<string>
  • Download baseline csv file to given path and return a promise for the path

    Parameters

    • cacheFile: string

    Returns Promise<string>

getBaseline

getBaselineData

  • getBaselineData(cacheFile: string): Promise<Array<any>>
  • Ensure that an up to date baseline csv is available in cache and return the data

    Parameters

    • cacheFile: string

    Returns Promise<Array<any>>

getSeasonData

  • getSeasonData(season: SeasonId, lag?: number): Promise<object>
  • Return season data for the given lag value (or latest). Return value is an object keyed by region ids having a list of { epiweek, wili } items as values

    Parameters

    Returns Promise<object>

getSeasonDataAllLags

  • getSeasonDataAllLags(season: SeasonId): Promise<object>
  • Return season data for all the lag values from 0 to 52. Return value is an object keyed by region ids having a list of { epiweek, wili, { lagData: [{ lag, wili } ...] }} items as values

    Parameters

    Returns Promise<object>

getSeasonTruth

  • getSeasonTruth(season: SeasonId, lag?: number): Promise<object>
  • Find true target values for given season. Return a promise of an object keyed by region id having a list of { target: truth } items

    Parameters

    Returns Promise<object>

getSeasonsData

  • getSeasonsData(seasons: SeasonId[], lag?: number): Promise<object[]>
  • Same as getSeasonDataLatestLag but works on a list of seasons and return Promise.all value

    Parameters

    • seasons: SeasonId[]
    • Optional lag: number

    Returns Promise<object[]>

parseOnset

  • parseOnset(ewPairs: EpiweekWili[], baseline: number): number
  • Return onset week TODO: Verify that this is correct

    Parameters

    Returns number

parsePeak

  • Return peak and peak-wk after checking if we have all available data for the season

    Parameters

    Returns object

    • [index: string]: number

parseWeekAhead

  • Return nAhead week ahead truth value starting at startAt

    Parameters

    Returns number

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