NIDSS Flu

Attribute Details
Source Name nidss_flu
Source Taiwan CDC
Geographic Levels Taiwan regions (see Geographic Codes)
Temporal Granularity Weekly (Epiweek)
Reporting Cadence Inactive - No longer updated since 2018w10
Temporal Scope Start 2008w14
License Open Access

Overview

This data source provides weekly influenza case counts for Taiwan, as reported by the National Infectious Disease Statistics System (NIDSS).

This is the documentation of the API for accessing the Taiwan National Infectious Disease Statistics System Flu (nidss_flu) endpoint of the Delphi’s epidemiological data.

General topics not specific to any particular endpoint are discussed in the API overview. Such topics include: contributing, citing, and data licensing.

Table of contents

  1. The API
    1. Parameters
      1. Required
      2. Optional
    2. Response
  2. Example URLs
    1. NIDSS Flu on 2015w01 (nationwide)
  3. Code Samples
    1. Legacy Clients
  4. Source and Licensing

The API

The base URL is: https://api.delphi.cmu.edu/epidata/nidss_flu/

Parameters

Required

Parameter Description Type
epiweeks epiweeks (see Date Formats) list of epiweeks
regions regions list of Taiwan region labels (see Geographic Codes)

Optional

Parameter Description Type
issues issues (see Date Formats) list of epiweeks
lag # weeks between each epiweek and its issue integer

Notes:

  • If both issues and lag are specified, only issues is used. If neither is specified, the current issues are used.

Response

Field Description Type
result result code: 1 = success, 2 = too many results, -2 = no results integer
epidata list of results array of objects
epidata[].release_date date when record was first published (yyyy-MM-dd) string
epidata[].region region string
epidata[].issue epiweek of publication integer
epidata[].epiweek epiweek during which the data was collected integer
epidata[].lag number of weeks between epiweek and issue integer
epidata[].visits total number of patients with ILI integer
epidata[].ili percent ILI float
message success or error message string

Example URLs

NIDSS Flu on 2015w01 (nationwide)

https://api.delphi.cmu.edu/epidata/nidss_flu/?regions=nationwide&epiweeks=201501

{
  "result": 1,
  "epidata": [
    {
      "release_date": "2016-01-05",
      "region": "Nationwide",
      "issue": 201552,
      "epiweek": 201501,
      "lag": 51,
      "visits": 65685,
      "ili": 1.21
    }
  ],
  "message": "success"
}

Code Samples

Libraries are available for R and Python. The following samples show how to import the library and fetch national NIDSS Flu data for epiweeks 201501-201510 (10 weeks total).

Install the package using pip:

pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
# Import
from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
# Fetch data
epidata = EpiDataContext()
res = epidata.pub_nidss_flu(regions=['nationwide'], epiweeks=EpiRange(201501, 201510))
print(res)
library(epidatr)
# Fetch data
res <- pub_nidss_flu(regions = 'nationwide', epiweeks = epirange(201501, 201510))
print(res)

Legacy Clients

We recommend using the modern client libraries mentioned above. Legacy clients are also available for Python, R, and JavaScript.

Optionally install the package using pip(env):

pip install delphi-epidata

Otherwise, place delphi_epidata.py from this repo next to your python script.

# Import
from delphi_epidata import Epidata
# Fetch data
res = Epidata.nidss_flu(['nationwide'], Epidata.range(201501, 201510))
print(res['result'], res['message'], len(res['epidata']))

Source and Licensing

The full text of the NIDSS Flu license information is available on the Taiwan Digital Development Department’s website.

Place delphi_epidata.R from this repo next to your R script.

source("delphi_epidata.R")
# Fetch data
res <- Epidata$nidss_flu(regions = list("nationwide"), epiweeks = Epidata$range(201501, 201510))
print(res$message)
print(length(res$epidata))
<!-- Imports -->
<script src="delphi_epidata.js"></script>
<!-- Fetch data -->
<script>
  EpidataAsync.nidss_flu('nationwide', EpidataAsync.range(201501, 201510)).then((res) => {
    console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
  });
</script>