Skip to contents

이 함수는 KOSIS 통계 설명 데이터를 데이터베이스 테이블로 가져옵(import)니다.

Usage

import_kosis_statexpl(
  stat_id = NULL,
  sleep = 0,
  verbose = TRUE,
  dbms = get_env("ecoDI_DBMS")
)

Arguments

stat_id

character. 통계 ID.

sleep

numeric. 가져오기를 시작하기 전에 대기할 시간(초). 기본값은 0.

verbose

logical. TRUE로 설정하면 추가 정보를 출력. 기본값은 TRUE.

dbms

character. 대상 DBMS 유형. 기본값은 ecoDI_DBMS 환경 변수에서 가져옴.

Value

logical. 가져오기 성공 여부를 나타내는 논리값.

Examples

# \donttest{
# Import KOSIS statistics explanation for a specific statistics ID
stat_id <- "1968005"
import_kosis_statexpl(stat_id = stat_id)
#>  Importing KOSIS stat explain for stat ID: 1968005
#>  KOSIS API URL: https://kosis.kr/openapi/statisticsExplData.do?method=getList&apiKey=&format=json&statId=1968005&metaItm=All&jsonVD=Y&jsonMVD=Y
#>  No data retrieved for table ID: mt_kosis_statexpl. Import operation aborted.
#> Warning: There is a result object still in use.
#> The connection will be automatically released when it is closed
#>  Imported record count: 0, column count: 0, status: 0
# }