--- license: other language: - en task_categories: - tabular-classification - tabular-regression multilinguality: multilingual size_categories: - n<1K tags: - "tabular" - "africa" - "open-data" - "official-statistics" - "south-africa" - "statistics-south-africa" - "demographics" - "stats-sa-census-dissemination" - "5-records" - "geography" - "stats-sa" - "census" - "public-api" configs: - config_name: default data_files: - split: train path: data/train-00000-of-00001.parquet pretty_name: "Stats Sa Census Geographic Levels | Africa (Statistics South Africa)" --- # Stats Sa Census Geographic Levels | Africa (Statistics South Africa) **5 rows** - **1 Africa country/area** - **detected** - **source table** - *Engineered by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica)* ![rows](https://img.shields.io/badge/rows-5-blue) ![countries](https://img.shields.io/badge/countries-1-green) ![period](https://img.shields.io/badge/period-detected-orange) ![indicators](https://img.shields.io/badge/indicators-0-purple) ![license](https://img.shields.io/badge/license-other-lightgrey) ## TL;DR This dataset contains **5 rows** from **Statistics South Africa**, covering **Stats Sa Census Geographic Levels**. It is published as ML-ready Parquet with consistent Hugging Face metadata, source provenance, and analysis-friendly loading examples. ## What This Dataset Measures Demographic datasets help analysts understand population structure, household conditions, migration, gender, age, and settlement patterns. Source-provided context: Geographic levels exposed by the Census dissemination portal. ## How To Read This Dataset - **One row means:** one source record from the original tabular resource, with Electric Sheep Africa provenance columns added where available. - **Primary geography column:** `country_iso3`. - **Best time column:** `source_period_start_year`. - **Time coverage basis:** source_period_start_year. - **Recommended join keys:** `country_iso3` where available plus source-specific keys. ## Coverage | Dimension | Value | |---|---:| | Rows | 5 | | Countries/areas | 1 | | First period | detected | | Last period | detected | | Indicators | 0 | | Columns | 16 | | Source format | CSV | ## Geographic Coverage Top areas shown below, sorted by row count when available: | Area | Rows | First year | Last year | Name | |------|-----:|-----------:|----------:|------| | `ZAF` | 5 | detected | detected | `South Africa` | ## Indicators, Variables, Or Resource Contents - This repo preserves one source tabular resource with its usable columns kept together. ## Schema | Column | Type | Description | Example | |--------|------|-------------|---------| | `source_record_id` | `int64` | Stable row identifier assigned during Electric Sheep Africa engineering. | `0` | | `country_iso3` | `dictionary` | ISO3 country or area code. | `ZAF` | | `country_name` | `dictionary` | Country or area name. | `South Africa` | | `geolevelid` | `int64` | Source column from the original resource. | `1` | | `geoleveldesc` | `string` | Source column from the original resource. | `National` | | `source_period_start_year` | `int64` | Start year inferred from source metadata. | `` | | `source_period_end_year` | `int64` | End year inferred from source metadata. | `` | | `source_period_label` | `null` | Source column from the original resource. | `` | | `source_provider` | `dictionary` | Publishing organization. | `Statistics South Africa` | | `source_dataset` | `dictionary` | Source dataset or package title. | `Stats SA Census geographic levels` | | `source_resource` | `dictionary` | Source resource title, table name, or file name. | `Stats SA Census geographic levels` | | `source_package_id` | `dictionary` | Source package identifier. | `stats-sa-census-geographic-levels-stats-sa-census-f828f77766d3d7` | | `source_resource_id` | `dictionary` | Source resource identifier. | `stats-sa-census-f828f77766d3d7` | | `source_url` | `dictionary` | Original source URL or download URL. | `https://disseminationapi-a2f6fff8f7a3f3ff.z01.azurefd.net/api/GeoLeve...` | | `license_id` | `dictionary` | Source license identifier. | `other-open` | | `retrieved_at` | `dictionary` | UTC source retrieval timestamp from the Electric Sheep Africa pipeline. | `2026-07-22T20:13:23Z` | ## Usage ```python from datasets import load_dataset ds = load_dataset("electricsheepafrica/africa-south-africa-stats-sa-census-geographic-levels-cae3ed74") df = ds["train"].to_pandas() print(df.head()) ``` ### Inspect Columns ```python print(df.info()) print(df.head()) ``` ### Filter By Geography ```python if "country_iso3" in df.columns: sample = df[df["country_iso3"] == "ZAF"] ``` ### Time-Series Pattern ```python if "value" in df.columns and "source_period_start_year" in df.columns: trend = df.sort_values("source_period_start_year") ``` ### Pivot For Analysis ```python if {"indicator_id", "year", "value"}.issubset(df.columns): matrix = df.pivot_table(index="year", columns="indicator_id", values="value") print(matrix.tail()) ``` ## Data Quality Notes - Canonical time field: `source_period_start_year`. - Missing values are preserved rather than silently imputed. - Column names are standardized for machine use; source meanings are preserved where known. - Always confirm source methodology, units, and collection definitions before policy, production, or redistribution-sensitive use. ## Source And Provenance - **Source:** [Statistics South Africa](https://census.statssa.gov.za) - **Publisher:** Statistics South Africa - **Portal:** [https://census.statssa.gov.za](https://census.statssa.gov.za) - **Resource:** [Stats SA Census geographic levels](https://disseminationapi-a2f6fff8f7a3f3ff.z01.azurefd.net/api/GeoLevels/getAll/) - **License:** other-open - **Retrieved/generated:** `2026-07-22T20:38:27Z` - **Hugging Face repo:** [electricsheepafrica/africa-south-africa-stats-sa-census-geographic-levels-cae3ed74](https://huggingface.co/datasets/electricsheepafrica/africa-south-africa-stats-sa-census-geographic-levels-cae3ed74) ## Transformations Applied - Converted the source table to Parquet for efficient analytics and ML workflows. - Added or preserved source provenance columns where available. - Standardized README metadata, dataset loading configuration, schema documentation, and citation format. - Preserved source-reported values without analytical imputation. ## Suggested Analyses - Build demographic profiles - Normalize indicators per capita - Join with service-delivery datasets - Build time-series views and period-over-period comparisons - Check missingness before modeling - Use `country_iso3` as the safest geography join key when present ## Citation ```bibtex @misc{electric_sheep_africa_africa_south_africa_stats_sa_census_geographic_levels_cae3ed74_2026, title = {Stats Sa Census Geographic Levels | Africa (Statistics South Africa)}, author = {Statistics South Africa}, year = {2026}, url = {https://census.statssa.gov.za}, publisher = {Hugging Face Datasets, engineered by Electric Sheep Africa}, howpublished = {\url{https://huggingface.co/datasets/electricsheepafrica/africa-south-africa-stats-sa-census-geographic-levels-cae3ed74}} } ``` ## License Released under other-open. Original data is published by Statistics South Africa. Electric Sheep Africa engineering standardizes the data for discovery, loading, and analysis on Hugging Face. Cite both the original source and this ML-ready dataset when used. ## About Electric Sheep Africa Electric Sheep Africa publishes ML-ready African public datasets on Hugging Face. --- Provenance: README standardized 2026-08-12 by the Electric Sheep Africa README system. Source URL: https://census.statssa.gov.za