decoupage: Delineation of Enumeration Areas and Area Sampling Frames
Source:R/decoupage-package.R
decoupage-package.RdTools 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 have | You need | Functions |
| Admin units, or other boundary units, and the lines on the ground inside them | Blocks that nest in the units | build_blocks(), delineate_settlements() |
| Blocks and a raster of counts, buildings or points | The size of each block | measure_units(), assign_points() |
| Blocks and a settlement directory with points and codes | A territory for each settlement, made of whole blocks | assign_units() |
| Blocks or any units with sizes | Pre-census enumeration areas, inventory blocks or other groups within size bounds, or a given number of them with n | unit_graph(), split_units(), group_units(), dissolve_units() |
| A frame of EAs with sizes | PSUs of a minimum size, with method = "merge" | group_units(), dissolve_units() |
| PSUs or any other units | An order for systematic selection and zones | order_units() |
| Selected PSUs too large to list | Segments of a target size | split_units() |
| The blocks of the selected PSUs | SSUs of a minimum size within each PSU, with within = "psu" | group_units() |
| EAs and their graph | Supervision areas or work zones over them | group_graph(), group_units() |
| Any layer of units | Its defects, its nesting in a boundary layer and its sizes out of bounds | check_units() |
| A grouping | Its violations, shapes and boundaries | check_groups(), group_metrics(), graph_lines() |
| Two versions of a frame | Kept codes and the correspondence between them | code_units(), crosswalk_units() |
| A grouping and new boundary lines | The grouping nested in the new lines | renest_units() |
| A frame and field points | The areas where they disagree | audit_field() |
| Nothing yet | A population and its frames with a known truth, for experiments | sim_population(), population_truth(), frame_truth() |
| EAs with household counts, or households from a census | A population on them with a known truth | populate_frame(), as_population() |
| A population and an EA layer | The layer as a frame of that population | as_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.
| Term | Censuses and household surveys | Agricultural area frames | Forest inventories |
| unit | block, enumeration area | land polygon | stand, piece of a stand |
part (within), boundary | admin unit, stratum | land-use stratum | management unit |
| patch | settlement | farm or field | stand |
| group | pre-census EA, PSU, SSU | PSU, segment | inventory block, crew block |
| piece | segment of a PSU | segment | piece of a large stand |
| size | persons, households, buildings | area, cropland | area, 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:
Ahmadou Dicko mail@ahmadoudicko.com (ORCID)