Description Usage Arguments Details Value Examples
View source: R/nhisDiseaseForcast.R
nhisDiseaseForcast function import the disease forcasting data about 3 days.
1 2 | nhisDiseaseForcast(key, localeCode = NULL, localeName = NULL, type,
slow = F, viz = F, verbose = F)
|
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. |
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.
data.frame and visualization.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.