File size: 9,016 Bytes
2d2c3ce
ba34f81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b3faa11
2d2c3ce
b3faa11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2d2c3ce
b3faa11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2d2c3ce
ba34f81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
---
annotations_creators:
- no-annotation
language_creators:
- found
language:
- en
license: other
multilinguality:
- monolingual
size_categories:
- 1K<n<10K
source_datasets:
- original
task_categories:
- tabular-classification
- other
task_ids: []
tags:
- africa
- humanitarian
- hdx
- electric-sheep-africa
- demographics
- health
- zmb
pretty_name: Zambia - Subnational Demographic and Health Data
dataset_info:
  features:
  - name: iso3
    dtype: string
  - name: dataid
    dtype: int64
  - name: indicator
    dtype: string
  - name: value
    dtype: float64
  - name: precision
    dtype: int64
  - name: dhs_countrycode
    dtype: string
  - name: countryname
    dtype: string
  - name: surveyyear
    dtype: int64
  - name: surveyid
    dtype: string
  - name: indicatorid
    dtype: string
  - name: indicatororder
    dtype: int64
  - name: indicatortype
    dtype: string
  - name: characteristicid
    dtype: int64
  - name: characteristicorder
    dtype: int64
  - name: characteristiccategory
    dtype: string
  - name: characteristiclabel
    dtype: string
  - name: byvariableid
    dtype: int64
  - name: byvariablelabel
    dtype: string
  - name: istotal
    dtype: int64
  - name: ispreferred
    dtype: int64
  - name: sdrid
    dtype: string
  - name: surveyyearlabel
    dtype: string
  - name: surveytype
    dtype: string
  - name: denominatorweighted
    dtype: float64
  - name: denominatorunweighted
    dtype: float64
  - name: cilow
    dtype: float64
  - name: cihigh
    dtype: float64
  - name: esa_source
    dtype: string
  - name: esa_processed
    dtype: string
  splits:
  - name: train
    num_bytes: 48430
    num_examples: 164
  - name: test
    num_bytes: 12592
    num_examples: 42
  download_size: 33292
  dataset_size: 61022
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: test
    path: data/test-*
---

# Zambia - Subnational Demographic and Health Data

**Publisher:** The DHS Program · **Source:** [HDX](https://data.humdata.org/dataset/dhs-subnational-data-for-zambia) · **License:** `hdx-other` · **Updated:** 2026-04-20

---

## Abstract

Contains data from the [DHS data portal](https://api.dhsprogram.com/). There is also a dataset containing [Zambia - National Demographic and Health Data](https://data.humdata.org/dataset/dhs-data-for-zambia) 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 first-level administrative unit observations. Data was last updated on HDX on 2026-04-20. Geographic scope: **ZMB**.

*Curated into ML-ready Parquet format by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica).*

---

## Dataset Characteristics

| | |
|---|---|
| **Domain** | Public health |
| **Unit of observation** | First-level administrative unit observations |
| **Rows (total)** | 1,743 |
| **Columns** | 30 (14 numeric, 16 categorical, 0 datetime) |
| **Train split** | 1,394 rows |
| **Test split** | 348 rows |
| **Geographic scope** | ZMB |
| **Publisher** | The DHS Program |
| **HDX last updated** | 2026-04-20 |

---

## Variables

**Geographic**`iso3` (ZMB), `location` (Central, Copperbelt, Luapula), `dhs_countrycode` (ZM), `countryname` (Zambia), `surveyyear` (range 1992.0–2024.0) and 8 others.

**Outcome / Measurement**`value` (range 0.0–254.0), `istotal` (range 0.0–0.0).

**Identifier / Metadata**`dataid` (range 584.0–7980700.0), `indicatorid` (RH_DELP_C_DHF, CH_DIAT_C_ORT, FE_FRTR_W_TFR), `characteristicid` (range 456001.0–456012.0), `characteristiclabel` (Central, Copperbelt, Luapula), `ispreferred` (range 0.0–1.0) and 3 others.

**Other** — `indicator` (Place of delivery: Health facility, Treatment of diarrhea: Either ORS or RHF, Total fertility rate 15-49), `precision` (range 0.0–1.0), `indicatororder` (range 11763080.0–260321010.0), `characteristicorder` (range 1456001.0–1456012.0), `denominatorweighted` (range 24.0–5683.0) and 2 others.

---

## Quick Start

```python
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 |
| `location` | object | 0.0% | Central, Copperbelt, Luapula |
| `dataid` | int64 | 0.0% | 584.0 – 7980700.0 (mean 4302204.7522) |
| `indicator` | object | 0.0% | Place of delivery: Health facility, Treatment of diarrhea: Either ORS or RHF, Total fertility rate 15-49 |
| `value` | float64 | 0.0% | 0.0 – 254.0 (mean 39.2798) |
| `precision` | int64 | 0.0% | 0.0 – 1.0 (mean 0.9243) |
| `dhs_countrycode` | object | 0.0% | ZM |
| `countryname` | object | 0.0% | Zambia |
| `surveyyear` | int64 | 0.0% | 1992.0 – 2024.0 (mean 2009.1664) |
| `surveyid` | object | 0.0% | ZM2013DHS, ZM2018DHS, ZM2024DHS |
| `indicatorid` | object | 0.0% | RH_DELP_C_DHF, CH_DIAT_C_ORT, FE_FRTR_W_TFR |
| `indicatororder` | int64 | 0.0% | 11763080.0 – 260321010.0 (mean 100486077.8026) |
| `indicatortype` | object | 0.0% | I |
| `characteristicid` | int64 | 0.0% | 456001.0 – 456012.0 (mean 456005.9484) |
| `characteristicorder` | int64 | 0.0% | 1456001.0 – 1456012.0 (mean 1456006.572) |
| `characteristiccategory` | object | 0.0% | Region |
| `characteristiclabel` | object | 0.0% | Central, Copperbelt, Luapula |
| `byvariableid` | int64 | 0.0% | 0.0 – 631002.0 (mean 21369.8847) |
| `byvariablelabel` | object | 71.3% |  |
| `istotal` | int64 | 0.0% | 0.0 – 0.0 (mean 0.0) |
| `ispreferred` | int64 | 0.0% | 0.0 – 1.0 (mean 0.8698) |
| `sdrid` | object | 0.0% |  |
| `regionid` | object | 0.0% |  |
| `surveyyearlabel` | float64 | 30.1% | 1992.0 – 2024.0 (mean 2009.63) |
| `surveytype` | object | 0.0% |  |
| `denominatorweighted` | float64 | 22.7% | 24.0 – 5683.0 (mean 738.317) |
| `denominatorunweighted` | float64 | 22.7% | 51.0 – 3620.0 (mean 741.9569) |
| `levelrank` | float64 | 16.6% | 1.0 – 1.0 (mean 1.0) |
| `esa_source` | object | 0.0% |  |
| `esa_processed` | object | 0.0% |  |

---

## Numeric Summary

| Column | Min | Max | Mean | Median |
|---|---|---|---|---|
| `dataid` | 584.0 | 7980700.0 | 4302204.7522 | 4315680.0 |
| `value` | 0.0 | 254.0 | 39.2798 | 32.6 |
| `precision` | 0.0 | 1.0 | 0.9243 | 1.0 |
| `surveyyear` | 1992.0 | 2024.0 | 2009.1664 | 2007.0 |
| `indicatororder` | 11763080.0 | 260321010.0 | 100486077.8026 | 94096040.0 |
| `characteristicid` | 456001.0 | 456012.0 | 456005.9484 | 456006.0 |
| `characteristicorder` | 1456001.0 | 1456012.0 | 1456006.572 | 1456006.0 |
| `byvariableid` | 0.0 | 631002.0 | 21369.8847 | 0.0 |
| `istotal` | 0.0 | 0.0 | 0.0 | 0.0 |
| `ispreferred` | 0.0 | 1.0 | 0.8698 | 1.0 |
| `surveyyearlabel` | 1992.0 | 2024.0 | 2009.63 | 2007.0 |
| `denominatorweighted` | 24.0 | 5683.0 | 738.317 | 615.0 |
| `denominatorunweighted` | 51.0 | 3620.0 | 741.9569 | 641.0 |
| `levelrank` | 1.0 | 1.0 | 1.0 | 1.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: `cilow`, `cihigh`. 1 column(s) were cast from string to numeric or datetime based on parse-success rate (>85% threshold). 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`, `surveyyearlabel`, `denominatorweighted`, `denominatorunweighted`.
- Refer to the [original HDX dataset page](https://data.humdata.org/dataset/dhs-subnational-data-for-zambia) for the publisher's own methodology notes and caveats.

---

## Citation

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

---

*[Electric Sheep Africa](https://huggingface.co/electricsheepafrica) — Africa's ML dataset infrastructure. Lagos, Nigeria.*