KCDC ILI

Attribute Details
Source Name kcdc_ili
Data Source Korea Disease Control and Prevention Agency (KCDC) ILI surveillance
Geographic Levels ROK (Republic of Korea) (see Geographic Codes)
Temporal Granularity Weekly (Epiweek)
Reporting Cadence Inactive - No longer updated since 2020w44
Temporal Scope Start 2004w36
License This was scraped from a publicly-accessible government website, but no explicit license terms were found.

Overview

This data source provides weekly influenza-like illness (ILI) data for the Republic of Korea, as reported by the Korea Centers for Disease Control and Prevention (KCDC).

This is the API documentation for accessing the KCDC ILI (kcdc_ili) endpoint of 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. KCDC ILI in ROK on 2020w01
  3. Code Samples
    1. Legacy Clients

The API

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

Parameters

Required

Parameter Description Type
regions Regions to fetch. See Geographic Codes. list of strings
epiweeks Epiweeks to fetch. Supports [epirange()] and defaults to all (“*”) dates. list of epiweeks

Optional

Parameter Description Type
issues Optionally, the issue(s) (see Date Formats) of the data to fetch. list of epiweeks
lag Optionally, the lag of the issues to fetch. 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 of release string
epidata[].region region name string
epidata[].issue epiweek of issue integer
epidata[].epiweek epiweek of data integer
epidata[].lag lag in weeks integer
epidata[].ili percent ILI float
epidata[].visits number of visits integer
message success or error message string

Example URLs

KCDC ILI in ROK on 2020w01

https://api.delphi.cmu.edu/epidata/kcdc_ili/?regions=ROK&epiweeks=202001

{
  "result": 1,
  "epidata": [
    {
      "release_date": "2020-01-10",
      "region": "ROK",
      "issue": 202001,
      "epiweek": 202001,
      "lag": 44,
      "ili": 49.8,
    }
  ],
  "message": "success"
}

Code Samples

Libraries are available for R and Python. The following samples show how to import the library and fetch KCDC ILI data for ROK for epiweeks 202001 and 202002.

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_kcdc_ili(regions=['ROK'], epiweeks=[202001, 202002])
print(res)
library(epidatr)
# Fetch data
res <- pub_kcdc_ili(regions = 'ROK', epiweeks = c(202001, 202002))
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.kcdc_ili(['ROK'], [202001, 202002])
print(res['result'], res['message'], len(res['epidata']))

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

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