Skip to contents

Tools to cut a territory into contiguous areas whose sizes stay within bounds, for censuses, household surveys and other area sampling frames, such as agricultural area frames and resource inventories. Small units are grouped into areas such as pre-census enumeration areas, following the split-and-merge method of Qader et al. (2021) doi:10.1057/s41599-020-00670-0 . The areas of a frame are merged into primary sampling units up to a minimum size, large ones are cut into segments, and units are ordered so that neighbors stay close. All rest on one contiguity graph and one size-constrained partition engine. Outputs are geometries, ids, sizes, an order and flags, and carry no selection probabilities or weights. A simulator builds household populations with a known truth, to compare frames.

Which function

You haveYou needFunctions
Admin units, or other boundary units, and the lines on the ground inside themBlocks that nest in the unitsbuild_blocks(), delineate_settlements()
Blocks and a raster of counts, buildings or pointsThe size of each blockmeasure_units(), assign_points()
Blocks and a settlement directory with points and codesA territory for each settlement, made of whole blocksassign_units()
Blocks or any units with sizesPre-census enumeration areas, inventory blocks or other groups within size bounds, or a given number of them with nunit_graph(), split_units(), group_units(), dissolve_units()
A frame of EAs with sizesPSUs of a minimum size, with method = "merge"group_units(), dissolve_units()
PSUs or any other unitsAn order for systematic selection and zonesorder_units()
Selected PSUs too large to listSegments of a target sizesplit_units()
The blocks of the selected PSUsSSUs of a minimum size within each PSU, with within = "psu"group_units()
EAs and their graphSupervision areas or work zones over themgroup_graph(), group_units()
Any layer of unitsIts defects, its nesting in a boundary layer and its sizes out of boundscheck_units()
A groupingIts violations, shapes and boundariescheck_groups(), group_metrics(), graph_lines()
Two versions of a frameKept codes and the correspondence between themcode_units(), crosswalk_units()
A grouping and new boundary linesThe grouping nested in the new linesrenest_units()
A frame and field pointsThe areas where they disagreeaudit_field()
Nothing yetA population and its frames with a known truth, for experimentssim_population(), population_truth(), frame_truth()
EAs with household counts, or households from a censusA population on them with a known truthpopulate_frame(), as_population()
A population and an EA layerThe layer as a frame of that populationas_frame()

Each row starts from what you have and names the functions that give what you need. The same functions serve every level of a frame. vignette("decoupage") works through both scales on the example data described in yako, and vignette("recipes") gathers short recipes.

One engine, several uses

Census delineation and survey frame work solve one problem. A set of polygons carries a size, polygons are adjacent through shared boundaries, and some boundaries cannot be crossed. The task is to group the polygons into contiguous groups whose sizes stay within bounds, near a target, with compact shapes.

At the census scale, the polygons are building blocks and the groups are pre-census enumeration areas, with a maximum population or building count as the hard constraint. At the survey scale, the polygons are the enumeration areas of a frame. Small ones are merged into primary sampling units up to a minimum size, and large ones are cut into segments below a maximum listing workload.

Other area sampling frames ask the same. An agricultural area frame groups land polygons into PSUs within land-use strata, sized by area or cropland, and cuts them into segments whose lines field staff can find. A stand-based forest inventory groups stands into inventory blocks within management units, sized by area or growing stock. The functions take any polygons and any additive size, so these cases need no other tool. Areas merged up to a minimum count can serve as statistical geography, but a minimum size alone is not a confidentiality guarantee. Selecting point samples, building routes and grouping areas by the similarity of their attributes are outside the package.

Vocabulary

The functions speak of units, parts, groups, pieces, patches and sizes. This table gives their names in three uses.

TermCensuses and household surveysAgricultural area framesForest inventories
unitblock, enumeration arealand polygonstand, piece of a stand
part (within), boundaryadmin unit, stratumland-use stratummanagement unit
patchsettlementfarm or fieldstand
grouppre-census EA, PSU, SSUPSU, segmentinventory block, crew block
piecesegment of a PSUsegmentpiece of a large stand
sizepersons, households, buildingsarea, croplandarea, growing stock

Where decoupage stops

decoupage returns geometry, ids, sizes, an order and flags. It never selects a sample and never attaches selection probabilities or weights, at any level. A segment's share of its enumeration area is reported as a size, and turning it into a conditional probability belongs to the sampling stage.

The handoff is a data frame, or an sf object, with plain columns. Sample sizes and allocation belong to svyplan, selection to sondage and samplyr. decoupage depends on none of them.

References

Qader, S., Lefebvre, V., Tatem, A. J., et al. (2021). Semi-automatic mapping of pre-census enumeration areas and population sampling frames. Humanities and Social Sciences Communications, 8, 3. doi:10.1057/s41599-020-00670-0

Author

Maintainer: Ahmadou Dicko mail@ahmadoudicko.com (ORCID)

Authors: