A reproducible Python pipeline that assembles every Rwanda Demographic and Health Survey round carrying child anthropometry — 1992, 2000, 2005, 2010, 2014–15, 2019–20 and 2025 — into a single child-level table of 36,386 children under five in 3,144 cluster-rounds, and validates it before releasing it.
Validation has three tiers: ten external benchmarks, each a published WHO 2006 stunting or severe-stunting prevalence for a Rwanda round — printed in that round’s own final report where the round postdates the standard, and otherwise a published recalculation; five internal invariants on the stunting indicators that need no published comparator and therefore cover all seven rounds; and two release gates on the code itself. The run exits non-zero if any check fails. All fifteen data checks pass, and the two gates add thirty-six passing checks. From 2005, stunting reproduces the published figure to within 0.05 percentage points and severe stunting to within 0.04, each taken at the precision its source prints. A design-based check reproduces the standard error, confidence interval and unweighted denominator printed in the sampling-error appendix of every final report obtained.
The pipeline reads the raw fixed-width recode files through their Stata dictionaries and maps 190 source variables onto 403 analytic variables across thirteen domains, recording for every variable which rounds carry it. Which files a round needs is a property of that round: three or four are read per round, twenty-four in all. It emits round-unique cluster and stratum identifiers and a pooled weight, so that the rounds can be stacked without silently collapsing clusters from different surveys into one primary sampling unit, or collapsing strata across rounds — which is the collapse that actually moves the standard error.
It documents and handles nine defects, each of which produces a plausible wrong answer rather than an error. Six are properties of the source data: the early rounds predating the WHO 2006 growth standard; the 1992 person file carrying no anthropometry block; maternal anthropometry sitting on the mother’s own record; the move of women’s anthropometry to a subsample in 2025; the −9999 sentinel in the geospatial extracts; and unit changes in modelled surfaces between extract vintages.
The other three were properties of this pipeline and are fixed in this version. Two were analytic names in the variable map that did not describe the DHS field mapped to them, and the recode documentation would have prevented both: hc15, which DHS labels “Height: lying or standing”, was named as though it were a 0/1 indicator and averages to “106.9% measured lying down”; hc33, which DHS labels “Completeness of HC32 information” — HC32 being the child’s date of birth — was named and labelled as age in days, under which the median child is one day old. Both now carry the name the recode gives them. The third: a derived binary written as a comparison returned 0 rather than missing wherever its input was missing, so a child with no z-score was recorded as not stunted rather than as unknown. Thirty-five derived indicators were affected, and every data check then in force passed throughout, because each filters to the validation denominator before computing. All three were found by the row-level cross-implementation comparison, which now runs as part of the build, and the two release gates added in this version prevent the third from recurring.
This archive contains no Demographic and Health Survey data. The DHS Program’s terms of use forbid redistributing the recode files, and the harmonised panel is derived from them. What is released is the code, the variable map, the validation report, the coverage matrix and the build log. Users register with The DHS Program, request the Rwanda surveys in flat ASCII format, and regenerate the panel themselves.
Written in Python; depends only on pandas and NumPy. A full rebuild from the raw recode files takes about ninety seconds.
An independent implementation in R, written from the same variable map and depending only on data.table and survey, is included in the archive. The two agree exactly on the spine — 36,386 children, 3,144 cluster-rounds, 34,343 usable height-for-age z-scores — and on all fifteen validation checks. Of the 397 analytic variables common to both, 387 agree row for row on values and on missingness. No variable disagrees on a value: all ten differences concern which rows are missing, and each is itemised with its row count and a reason. Releasing both is deliberate: the validation tiers test the data, not the code, and a cross-implementation comparison is what catches an implementation defect that leaves a variable absent, or silently non-missing, rather than wrong. Disclaimer. The views expressed in this archive are those of the authors and do not necessarily represent the official position of the Republic of Rwanda Ministry of Health, the National Health Intelligence Centre, Expertise France, or Sand Technologies. This software accompanies a manuscript that has not completed peer review; the findings it reproduces should be read in that light. This archive contains no Demographic and Health Survey data — The DHS Program’s terms of use forbid redistributing the recode files, so users must register with The DHS Program, request the Rwanda surveys themselves, and regenerate the panel from their own copy. Neither The DHS Program nor ICF is responsible for the harmonisation choices made here or for any result produced by this pipeline.