← ClaudeAtlas

datalisted

Fetch a KOSIS statistical table as a time series, optionally pivoting items to columns. Holds no logic of its own -- it calls the pykosis package's CLI (`kosis data`) and shows the result to the user. Needs an organization code and a table code (find them with the search or list skill). Trigger phrases: KOSIS 데이터 가져와, 통계표 데이터, 국가통계 시계열, KOSIS statistic time series, fetch KOSIS table data, life table data, 인구 통계 가져와.
seokhoonj/pykosis · ★ 0 · Data & Documents · score 72
Install: claude install-skill seokhoonj/pykosis
# kosis -- statistical table data Take a KOSIS organization code and table code and print that table's observations. The fetching and parsing live in the pykosis package (on PyPI); this skill is a thin wrapper that calls its CLI and relays the result. A rejected key or a vendor error comes back as a one-line `kosis: <message>` -- relay it as-is rather than throwing a stack trace at the user. (A missing or malformed argument is caught earlier by argparse, which prints usage and exits 2.) ## Prerequisite This plugin calls the `kosis` CLI, so the package must be installed and an API key set: ``` pipx install pykosis # or: pip install pykosis export KOSIS_API_KEY=... # a free key from https://kosis.kr/openapi/ ``` That puts the `kosis` command on PATH. The key can also be stored in `~/.config/pykosis/credentials.json` as `{"KOSIS_API_KEY": "..."}`. Without a key the CLI exits with `kosis: no KOSIS API key ...`; relay that and point the user at the KOSIS site. **Never print, log, quote, or echo the `KOSIS_API_KEY` value itself** -- confirm only that a key is set. ## Running ``` kosis data <ORG_ID> <TBL_ID> [--frequency ...] [--start ...] [--end ...] [--recent N] [--interval N] [--obj-l1 ...] [--item ...] [--pivot [LABEL]] [--json] ``` Options (`kosis data --help` is the source of truth): - `--frequency annual|half_yearly|quarterly|monthly|daily|multiyear|irregular` -- how often (default: annual). - `--start` / `--end` -- period-formatted bounds: `2024` (ann