nhisDiseaseForcast: National Health Insurance Service, The Disease forcasting...

Description Usage Arguments Details Value Examples

View source: R/nhisDiseaseForcast.R

Description

nhisDiseaseForcast function import the disease forcasting data about 3 days.

Usage

1
2
nhisDiseaseForcast(key, localeCode = NULL, localeName = NULL, type,
  slow = F, viz = F, verbose = F)

Arguments

key

character value. API key issued from <www.data.go.kr>. no default.

localeCode

numeric value. SiGunGu code which means legal area. one of localeCode or localeName should be inserted.

localeName

character value. SiGunGu name wich means legal area. one of localeCode or localeName should be inserted. It should be Korean.

type

character value. decide the type of disease. it should be one of "Influenza", "Eye", "Food", "Asthma", "Skin", or "All". see details.

slow

logical value. if TRUE, give sleep inbetween importing. default is TRUE.

viz

logical value. if TRUE, provide simple 2d visualization result. x: date, y: mean index.

verbose

logical value. if TRUE, provide process bar. Default value set as false.

Details

nhisDiseaseForcast function import forcasted count of treatment and risk of five diseases.
It is calculated by National Health Insurance Service.
Explanation about "type" as follow.
"Influenza" = Predicted number of patients and risk of influenza from the day to the day after tomorrow.
"Eye" = Predicted number of patients and risk of eye disease at the day.
"Food" = Predicted number of patients and risk of food poisoning from the day to the day after tomorrow.
"Asthma" = Predicted number of patients and risk of asthma at the day.
"Skin" = Predicted number of patients and risk of skin disease from the day to the day after tomorrow.

localeCode argument should be first 2-digit value of SiGunGu code. For example, "11" means Seoul and "12" means Busan.

Value

data.frame and visualization.

Examples

1
2
3
4
5
6
7
 key <- 'your key issued from data.go.kr'

 # example 1 searching by localeCode.
 data <- nhisDiseaseForcast(key, localeCode = c(11, 41), type = "Asthma", slow = T)

 # example 2 searching by localeName
 data <- nhisDiseaseForcast(key, localeName = c(enc2utf8('수원')), type = "All", slow = T)

lawine90/datagokR documentation built on Sept. 24, 2020, 9:42 p.m.