Skip to main content

Python toolkit for Indonesian official microdata (SAKERNAS)

Project description

StatsKita: Python toolkit for Indonesian official microdata (SAKERNAS)

v0.2.0-beta: Multi-wave analysis with 100% validation. Production-ready for 4 waves (2023-02 to 2025-02).

TL;DR

Python toolkit for SAKERNAS labor force survey data with multi-wave analysis.

Quick Start

import statskita as sk

# load SAKERNAS data (supports .dbf, .dta, .sav, .parquet)
df = sk.load_sakernas("sakernas_2025-02.parquet")

# wrangle and harmonize
clean_df = sk.wrangle(df, harmonize=True, source_wave="2025-02")

# declare survey design
design = sk.declare_survey(clean_df, weight="survey_weight", strata=None, psu="psu")

# calculate indicators
results = sk.calculate_indicators(
    design,
    indicators="all",
    as_table=True,
    include_ci=False
)

Multi-Wave Analysis

# load multiple waves
waves = ["2023-02", "2023-08", "2024-02", "2025-02"]
harmonized = {}

for wave in waves:
    df = sk.load_sakernas(f"sakernas_{wave}.parquet", wave=wave)
    harmonized[wave] = sk.wrangle(df, source_wave=wave, harmonize=True)

# compare across waves
results = sk.calculate_indicators_multi(
    harmonized,
    indicators="all",
    as_wide=True
)

print(results)

Output (wide-format comparison):

┌─────────────────────────────────┬──────┬─────────┬─────────┬─────────┬─────────┐
│ 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_labor_force_participat…  ┆ %    ┆ ...     ┆ ...     ┆ ...     ┆ ...     │
│ average_wage                    ┆ M Rp ┆ ...     ┆ ...     ┆ ...     ┆ ...     │
└─────────────────────────────────┴──────┴─────────┴─────────┴─────────┴─────────┘

Installation

pip install statskita

Features

  • Multi-wave support: Compare indicators across 4 validated waves (2023-02 to 2025-02)
  • Multiple formats: Load .dbf, .dta, .sav, .parquet files
  • Config-driven: Automatic harmonization across waves
  • Survey-aware: Proper handling of weights, PSU, strata
  • Fast processing: Polars backend for large datasets
  • Complete indicators: LFPR, unemployment, underemployment, wages, and more

See examples/ directory 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.2.0.tar.gz (236.6 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.2.0-py3-none-any.whl (61.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for statskita-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5e4da81f9a0fa87c5aa052310cfe042f4c85b09ba334ee8a917f4c9ccb656b27
MD5 b5bcf68344b12e53c9113eeb5e652631
BLAKE2b-256 86a1c100ba3f00685237e73dd713703dc0ddf2b6fafa7501f41964717683ca20

See more details on using hashes here.

Provenance

The following attestation bundles were made for statskita-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: statskita-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 61.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae8c2730901b409e3559908122b4212d484a73536837229b0757f286f35c85e2
MD5 74bd5198d5d518490472825802d01842
BLAKE2b-256 c69543abb2195e607bfad6d8b643675a89afdbd18b7da85c65af16f52690e24a

See more details on using hashes here.

Provenance

The following attestation bundles were made for statskita-0.2.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