Skip to main content

kualitasid 🇮🇩

CI PyPI Python

Profil dan pembersih kualitas data untuk DataFrame/CSV berformat Indonesia. Yang dikerjakan di level kolom dan baris, bukan hanya satu nilai:

  • mendeteksi tipe tiap kolom (NIK, NPWP, HP, tanggal, Rupiah, plat, provinsiu),
  • menghitung skor kualitas 0-100 dan melaporkan nilai tidak valid, kosong, duplikat, spasi berlebih,
  • memeriksa konsistensi antar kolom: NIK vs tanggal lahir dan jenis kelamin,
  • membersihkan otomatis (Rp 1,5 jt → 1500000, 0812-3456-7890 → +6281234567890),
  • laporan teks, JSON, atau satu halaman HTML.

Semua diproses lokal. Tidak ada data yang dikirim ke mana pun.

Contoh

pip install kualitasid
kualitasid data_saya.csv --html laporan.html --bersihkan bersih.csv

Untuk mencoba dengan data fiktif, unduh examples/data_kotor.csv dari repo ini dan simpan sebagai data_kotor.csv.

import pandas as pd
from kualitasid import profil, bersihkan, teks

df = pd.read_csv("data_kotor.csv", dtype=str)
laporan = profil(df)        # NIK/NPWP/HP pada contoh disamarkan secara bawaan
print(teks(laporan))
df_bersih = bersihkan(df)

Cuplikan keluaran:

Konsistensi antar kolom: 2 masalah di 2 baris
- baris 1: nik_jenis_kelamin (NIK 317101******0002, nilai=Laki-laki, menurut NIK=P)
- baris 2: nik_tanggal_lahir (NIK 327301******0004, nilai=16-03-1985, menurut NIK=15-03-xx85)

Excel (.xlsx)

pip install "kualitasid[excel]"
kualitasid data.xlsx --sheet "Data 2026" --html laporan.html

Tanpa --sheet, lembar pertama yang dibaca. Format .xls lama tidak didukung; simpan ulang sebagai .xlsx atau CSV.

Format kolom NIK, NPWP, dan nomor HP sebagai Teks di Excel sebelum menyimpan. Excel memotong angka yang lebih dari 15 digit dan menghapus angka 0 di depan nomor yang disimpan sebagai angka. Kerusakan itu sudah terjadi di file sumber dan tidak bisa dipulihkan oleh kualitasid.

Batasan (penting)

  • Validasi NIK dan NPWP hanya struktur, bukan bukti orangnya ada. Kode wilayah di bawah provinsi belum diperiksa.
  • Provinsi di NIK adalah tempat pendaftaran, jadi kolom provinsi tidak dibandingkan dengan NIK.
  • Tahun di NIK hanya 2 digit, jadi abad tidak diperiksa.
  • Jangan unggah data pribadi asli ke repo publik. Contoh di examples/ fiktif.
  • Data Excel yang sudah rusak oleh Excel sendiri (NIK terpotong, nol di depan hilang) akan terbaca sebagai nilai tidak valid.

Alternatif

Kalau yang kamu butuhkan validator/parser per-nilai, data wilayah lengkap, atau penyamaran PII untuk teks bebas, pustaka seperti lokal-id, nik-lookup, dan daerah-indonesia lebih lengkap di sisi itu. kualitasid fokus pada profil per kolom, skor, dan konsistensi antar kolom pada DataFrame.

Pengembangan

git clone https://github.com/Nuzuli/kualitasid.git
cd kualitasid
pip install -e ".[dev]"
python -m pytest tests/ -v --cov=kualitasid
ruff check src tests && mypy src

Lisensi

MIT. Lihat LICENSE.

Metadata

Release files for kualitasid 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kualitasid 0.3.0
File Size Uploaded Provenance Actions
kualitasid-0.3.0.tar.gz 17.3 kB With provenance Details for kualitasid-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kualitasid 0.3.0
File Interpreter ABI Platform Actions
kualitasid-0.3.0-py3-none-any.whl Python 3 none any Details for kualitasid-0.3.0-py3-none-any.whl

Total release size: 31.1 kB

Release files / kualitasid-0.3.0.tar.gz

Download URL kualitasid-0.3.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6d160992ac5ed376ccac0f1db1212cf4d3fdfbfa5d35b7d2b6b3157ba8ff0f8a
BLAKE2b-256 checksum
How to use checksums
472fe0895ddd508cdf55f2c5ea30ebc3e9d867c13d7825fa213039a841576933
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / kualitasid-0.3.0-py3-none-any.whl

Download URL kualitasid-0.3.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a413e935dfa29a5f7d7edeeb5c63a69831a2ebccc12a808bdb633bc76e59f25
BLAKE2b-256 checksum
How to use checksums
544541ef1f352b17249006d91dc850f46ba1d86bc2425baa1ac2cce1eb182717
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for kualitasid 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kualitasid-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page