Kossisoroyce's picture
Add README.md
c2735b7 verified
|
Raw
History Blame
7.42 kB
metadata
annotations_creators:
  - no-annotation
language_creators:
  - found
language:
  - en
license: other
multilinguality:
  - monolingual
size_categories:
  - n<1K
source_datasets:
  - original
task_categories:
  - tabular-classification
task_ids: []
tags:
  - africa
  - humanitarian
  - hdx
  - electric-sheep-africa
  - demographics
  - health
  - zmb
pretty_name: Zambia - National Demographic and Health Data
dataset_info:
  splits:
    - name: train
      num_examples: 164
    - name: test
      num_examples: 41

Zambia - National Demographic and Health Data

Publisher: The DHS Program · Source: HDX · License: hdx-other · Updated: 2026-04-20


Abstract

Contains data from the DHS data portal. There is also a dataset containing Zambia - Subnational Demographic and Health Data on HDX.

The DHS Program Application Programming Interface (API) provides software developers access to aggregated indicator data from The Demographic and Health Surveys (DHS) Program. The API can be used to create various applications to help analyze, visualize, explore and disseminate data on population, health, HIV, and nutrition from more than 90 countries.

Each row in this dataset represents country-level aggregates. Data was last updated on HDX on 2026-04-20. Geographic scope: ZMB.

Curated into ML-ready Parquet format by Electric Sheep Africa.


Dataset Characteristics

Domain Public health
Unit of observation Country-level aggregates
Rows (total) 206
Columns 29 (14 numeric, 15 categorical, 0 datetime)
Train split 164 rows
Test split 41 rows
Geographic scope ZMB
Publisher The DHS Program
HDX last updated 2026-04-20

Variables

Geographiciso3 (ZMB), dhs_countrycode (ZM), countryname (Zambia), surveyyear (range 1992.0–2024.0), surveyid (ZM2018DHS, ZM2024DHS, ZM2007DHS) and 6 others.

Outcome / Measurementvalue (range 0.4–729.0), istotal (range 1.0–1.0).

Identifier / Metadatadataid (range 41515.0–834693.0), indicatorid (RH_DELP_C_DHF, CH_DIAT_C_ORT, CM_ECMR_C_IMR), characteristicid (range 1000.0–10000.0), characteristiclabel (Total, Total 15-49), ispreferred (range 0.0–1.0) and 3 others.

Otherindicator (Place of delivery: Health facility, Treatment of diarrhea: Either ORS or RHF, Infant mortality rate), precision (range 0.0–1.0), indicatororder (range 11763080.0–260321010.0), characteristicorder (range 0.0–10000.0), denominatorweighted (range 745.0–27859.0) and 3 others.


Quick Start

from datasets import load_dataset

ds    = load_dataset("electricsheepafrica/africa-demographics-zambia")
train = ds["train"].to_pandas()
test  = ds["test"].to_pandas()

print(train.shape)
train.head()

Schema

Column Type Null % Range / Sample Values
iso3 object 0.0% ZMB
dataid int64 0.0% 41515.0 – 834693.0 (mean 483738.1456)
indicator object 0.0% Place of delivery: Health facility, Treatment of diarrhea: Either ORS or RHF, Infant mortality rate
value float64 0.0% 0.4 – 729.0 (mean 58.3112)
precision int64 0.0% 0.0 – 1.0 (mean 0.8252)
dhs_countrycode object 0.0% ZM
countryname object 0.0% Zambia
surveyyear int64 0.0% 1992.0 – 2024.0 (mean 2008.7573)
surveyid object 0.0% ZM2018DHS, ZM2024DHS, ZM2007DHS
indicatorid object 0.0% RH_DELP_C_DHF, CH_DIAT_C_ORT, CM_ECMR_C_IMR
indicatororder int64 0.0% 11763080.0 – 260321010.0 (mean 96782154.7087)
indicatortype object 0.0% I
characteristicid int64 0.0% 1000.0 – 10000.0 (mean 2747.5728)
characteristicorder int64 0.0% 0.0 – 10000.0 (mean 1941.7476)
characteristiccategory object 0.0% Total, Total 15-49
characteristiclabel object 0.0% Total, Total 15-49
byvariableid int64 0.0% 0.0 – 631002.0 (mean 19529.5583)
byvariablelabel object 67.5% Five years preceding the survey, Ten years preceding the survey, Three years preceding the survey
istotal int64 0.0% 1.0 – 1.0 (mean 1.0)
ispreferred int64 0.0% 0.0 – 1.0 (mean 0.8155)
sdrid object 0.0%
surveyyearlabel object 0.0%
surveytype object 0.0%
denominatorweighted float64 31.1% 745.0 – 27859.0 (mean 7003.7183)
denominatorunweighted float64 31.1% 750.0 – 27883.0 (mean 7038.1408)
cilow float64 75.2% 5.3 – 586.0 (mean 100.5471)
cihigh float64 75.2% 6.6 – 872.0 (mean 141.9471)
esa_source object 0.0%
esa_processed object 0.0%

Numeric Summary

Column Min Max Mean Median
dataid 41515.0 834693.0 483738.1456 546494.0
value 0.4 729.0 58.3112 42.0
precision 0.0 1.0 0.8252 1.0
surveyyear 1992.0 2024.0 2008.7573 2007.0
indicatororder 11763080.0 260321010.0 96782154.7087 83566070.0
characteristicid 1000.0 10000.0 2747.5728 1000.0
characteristicorder 0.0 10000.0 1941.7476 0.0
byvariableid 0.0 631002.0 19529.5583 0.0
istotal 1.0 1.0 1.0 1.0
ispreferred 0.0 1.0 0.8155 1.0
denominatorweighted 745.0 27859.0 7003.7183 5771.0
denominatorunweighted 750.0 27883.0 7038.1408 5894.0
cilow 5.3 586.0 100.5471 63.0
cihigh 6.6 872.0 141.9471 78.0

Curation

Raw data was downloaded from HDX via the CKAN API and converted to Parquet. Column names were lowercased and standardised to snake_case. Common missing-value markers (N/A, null, none, -, unknown, no data, #N/A) were unified to NaN. 2 column(s) with >80% missing values were removed: regionid, levelrank. The dataset was split 80/20 into train and test partitions using a fixed random seed (42) and saved as Snappy-compressed Parquet.


Limitations

  • Data originates from The DHS Program and has not been independently validated by ESA.
  • Automated cleaning cannot correct for misreported values, definitional inconsistencies, or sampling bias in the original collection.
  • The following columns have >20% missing values and should be treated with caution in modelling: byvariablelabel, denominatorweighted, denominatorunweighted, cilow, cihigh.
  • Refer to the original HDX dataset page for the publisher's own methodology notes and caveats.

Citation

@dataset{hdx_africa_demographics_zambia,
  title     = {Zambia - National Demographic and Health Data},
  author    = {The DHS Program},
  year      = {2026},
  url       = {https://data.humdata.org/dataset/dhs-data-for-zambia},
  note      = {Repackaged for machine learning by Electric Sheep Africa (https://huggingface.co/electricsheepafrica)}
}

Electric Sheep Africa — Africa's ML dataset infrastructure. Lagos, Nigeria.