Skip to main content

Python toolkit for Indonesian official microdata (SAKERNAS, SUSENAS)

Project description

StatsKita: Python toolkit for Indonesian official microdata (SAKERNAS, SUSENAS)

PyPI version PyPI Downloads Build Status Python 3.10+ License: MIT

v0.3.0: SAKERNAS (labor) + SUSENAS (poverty/inequality)

What's Supported

Dataset Waves Indicators
SAKERNAS 5 (2023-02 → 2025-02) Labor force, employment, wages
SUSENAS 2 (2023-03, 2024-03) Poverty (P0, P1, P2), Gini

Installation

pip install statskita

Quick Start

Single wave:

import statskita as sk

# SAKERNAS
df = sk.load_sakernas(wave="2025-02")
clean_df = sk.wrangle(df, harmonize=True, source_wave="2025-02")
design = sk.declare_survey(clean_df, weight="survey_weight", psu="psu")
results = sk.calculate_indicators(design, ["unemployment_rate", "lfpr"])

# SUSENAS
df = sk.load_susenas(wave="2024-03", module="kp", category="housing")
design = sk.declare_survey(df, weight="WEIND", wave="2024-03")
results = sk.calculate_indicators(design, ["p0", "p1", "p2", "gini"])

Multi-wave comparison:

# SAKERNAS
sakernas_waves = {w: sk.load_sakernas(wave=w) for w in ["2023-02", "2023-08", "2024-02", "2025-02"]}
harmonized = {w: sk.wrangle(df, harmonize=True, source_wave=w) for w, df in sakernas_waves.items()}
sakernas_results = sk.calculate_indicators_multi(harmonized, "all", as_wide=True)

# SUSENAS
susenas_waves = {w: sk.load_susenas(wave=w, module="kp", category="housing") for w in ["2023-03", "2024-03"]}
susenas_results = sk.calculate_indicators_multi(susenas_waves, ["p0", "p1", "p2", "gini"], as_wide=True)

SAKERNAS output:

┌─────────────────────────────────┬──────┬─────────┬─────────┬─────────┬─────────┐
│ indicator                       ┆ unit ┆ 2023-02 ┆ 2023-08 ┆ 2024-02 ┆ 2025-02 │
├─────────────────────────────────┼──────┼─────────┼─────────┼─────────┼─────────┤
│ labor_force_participation_rate  ┆ %    ┆ ...     ┆ ...     ┆ ...     ┆ ...     │
│ employment_rate                 ┆ %    ┆ ...     ┆ ...     ┆ ...     ┆ ...     │
│ unemployment_rate               ┆ %    ┆ 5.45    ┆ 5.32    ┆ 4.82    ┆ 4.76    │
│ underemployment_rate            ┆ %    ┆ ...     ┆ ...     ┆ ...     ┆ ...     │
│ female_lfpr                     ┆ %    ┆ ...     ┆ ...     ┆ ...     ┆ ...     │
│ average_wage                    ┆ M Rp ┆ ...     ┆ ...     ┆ ...     ┆ ...     │
│ neet_rate                       ┆ %    ┆ ...     ┆ ...     ┆ ...     ┆ ...     │
└─────────────────────────────────┴──────┴─────────┴─────────┴─────────┴─────────┘

SUSENAS output:

┌───────────┬──────┬─────────┬─────────┐
│ indicator ┆ unit ┆ 2023-03 ┆ 2024-03 │
├───────────┼──────┼─────────┼─────────┤
│ p0        ┆      ┆ 9.36    ┆ 9.03    │
│ p1        ┆      ┆ 1.53    ┆ 1.46    │
│ p2        ┆      ┆ 0.38    ┆ 0.35    │
│ gini      ┆      ┆ 0.39    ┆ 0.38    │
└───────────┴──────┴─────────┴─────────┘

Features

  • Multi-wave analysis: Built-in cross-wave comparison
  • Survey-aware: Handles weights, strata, PSU correctly
  • Open source: Free, no licensing costs

See examples/ for detailed usage.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statskita-0.3.0.tar.gz (254.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

statskita-0.3.0-py3-none-any.whl (79.7 kB view details)

Uploaded Python 3

File details

Details for the file statskita-0.3.0.tar.gz.

File metadata

  • Download URL: statskita-0.3.0.tar.gz
  • Upload date:
  • Size: 254.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for statskita-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4b357b119194a732a9c29d906a5867e3ab6bc6761e6cdd8da5ec3f662bd2f5a9
MD5 d54b313ac47f8aaca499b38e904d54b9
BLAKE2b-256 de940e18d1067f7955333d8279b20ee0e7480ab43055c652882f25d684f595cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for statskita-0.3.0.tar.gz:

Publisher: release.yml on okkymabruri/statskita

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file statskita-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: statskita-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 79.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for statskita-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03ec9a1124dd066cdb5270f468f176be6507a23fcf6304ad90c71888e2e024f7
MD5 0d624df56a4a717df7a526bb114e986a
BLAKE2b-256 d849aec4e39397a085cd378558d3bcc9a41d98810b5c887a0bf5f9001365d594

See more details on using hashes here.

Provenance

The following attestation bundles were made for statskita-0.3.0-py3-none-any.whl:

Publisher: release.yml on okkymabruri/statskita

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page