Survey Sampling Design with R

Planning, Drawing and Testing Samples

Author

Ahmadou Dicko

Preface

This book is a guide to planning and selecting probability samples in R. It follows one workflow across three layers. svyplan sizes and allocates the sample, samplyr declares the design and selects the units, and survey or srvyr estimates from the collected data.

Maps

The maps draw the EAs of bfa_eas and zwe_eas on the WorldPop pre-enumeration-area polygons they were built from (Qader et al. 2022, 2024), licensed CC BY 4.0. The polygons are repaired into a partition without gaps or overlaps and simplified for display. The administrative outlines are unions of these polygons, so they are not official boundaries.

The Gambia maps draw an EA frame reconstructed with the decoupage package from the settlement layer of the Gambia Bureau of Statistics; the COD-AB boundaries of The Gambia (OCHA, CC BY-IGO); and Overture Maps buildings, roads and water (ODbL and CC BY 4.0, release 2026-09-23.1). The frame follows the 2024 EA codes. Its EAs and outlines are modeled, not official boundaries.

The Rwanda maps draw an EA frame built the same way from the 2022 census villages and their population (NISR open data), NISR’s sector household counts and Overture Maps buildings (ODbL and CC BY 4.0, release 2026-09-23.1). Its counts by district and residence follow the census frame of the 2025 Rwanda DHS (National Institute of Statistics of Rwanda et al. 2026). Its EAs are modeled, not official boundaries. The district and province outlines are those of the national geoportal, simplified for display.

The Malawi maps draw an EA frame built the same way from the household counts of each 2018 census EA and the 2018 traditional authorities, both shared by the National Statistical Office on HDX (CC BY-IGO), and Overture Maps buildings, roads and water (ODbL and CC BY 4.0, release 2026-09-23.1). Its EA codes and household counts are those of the census. Its EA boundaries are modeled, not official, and the district and region outlines are unions of the traditional authorities, simplified for display. The outlines of Dzaleka refugee camp and of its shelters, digitized from Google Open Buildings, come from UNHCR geoservices (CC BY 4.0).

Package versions

package version
svyplan 0.26.2
samplyr 0.9.999
sondage 0.15.0
decoupage 0.2.0
survey 4.5