Dataset Viewer
Auto-converted to Parquet Duplicate
The dataset viewer is not available for this split.
Arrow: Parquet argument error: External: Cast error: Unsupported output type for dictionary packing: Null
Error code:   UnexpectedError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Stats Sa Census Main Places | Africa (Statistics South Africa)

14,064 rows - 1 Africa country/area - detected - source table - Engineered by Electric Sheep Africa

rows countries period indicators license

TL;DR

This dataset contains 14,064 rows from Statistics South Africa, covering Stats Sa Census Main Places. 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: Main-place metadata from 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 14,064
Countries/areas 1
First period detected
Last period detected
Indicators 0
Columns 25
Source format CSV

Geographic Coverage

Top areas shown below, sorted by row count when available:

Area Rows First year Last year Name
ZAF 14,064 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<values=string, indices=int8, ordered=0> ISO3 country or area code. ZAF
country_name dictionary<values=string, indices=int8, ordered=0> Country or area name. South Africa
munimdbc string Source column from the original resource. BUF
municode double Source column from the original resource. 260.0
muniname string Source column from the original resource. Buffalo City
districtmdbc string Source column from the original resource. BUF
districtmnc double Source column from the original resource. ``
districtname string Source column from the original resource. Buffalo City
provcode int64 Source column from the original resource. 2
mainplacecode double Source column from the original resource. 260001.0
mainplacename string Source column from the original resource. South Down
mainplaceinfo string Source column from the original resource. This is South Down MainPlaceInfo testing info testing info testing in...
imagepath string Source column from the original resource. mainplaces/mainplace.png
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<values=string, indices=int8, ordered=0> Publishing organization. Statistics South Africa
source_dataset dictionary<values=string, indices=int8, ordered=0> Source dataset or package title. Stats SA Census main places
source_resource dictionary<values=string, indices=int8, ordered=0> Source resource title, table name, or file name. Stats SA Census main places
source_package_id dictionary<values=string, indices=int8, ordered=0> Source package identifier. stats-sa-census-main-places-stats-sa-census-86cc1ece558431
source_resource_id dictionary<values=string, indices=int8, ordered=0> Source resource identifier. stats-sa-census-86cc1ece558431
source_url dictionary<values=string, indices=int8, ordered=0> Original source URL or download URL. https://disseminationapi-a2f6fff8f7a3f3ff.z01.azurefd.net/api/MainPla...
license_id dictionary<values=string, indices=int8, ordered=0> Source license identifier. other-open
retrieved_at dictionary<values=string, indices=int8, ordered=0> UTC source retrieval timestamp from the Electric Sheep Africa pipeline. 2026-07-22T20:13:23Z

Usage

from datasets import load_dataset

ds = load_dataset("electricsheepafrica/africa-south-africa-stats-sa-census-main-places-5a92e528")
df = ds["train"].to_pandas()
print(df.head())

Inspect Columns

print(df.info())
print(df.head())

Filter By Geography

if "country_iso3" in df.columns:
    sample = df[df["country_iso3"] == "ZAF"]

Time-Series Pattern

if "value" in df.columns and "source_period_start_year" in df.columns:
    trend = df.sort_values("source_period_start_year")

Pivot For Analysis

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

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

@misc{electric_sheep_africa_africa_south_africa_stats_sa_census_main_places_5a92e528_2026,
  title        = {Stats Sa Census Main Places | 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-main-places-5a92e528}}
}

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

Downloads last month
11

Collection including electricsheepafrica/africa-south-africa-stats-sa-census-main-places-5a92e528