Aggregating points to zones — Task
Implementation: Aggregating points to zones (Recipe - QGIS).
Aggregating points to zones is the Task of summarising point data — dwellings, buildings, people at their addresses — within a set of zones: districts, statistical areas or a grid. It is how almost all Danish statistics reach a map, both because a map of points hides the pattern and because points can identify individuals.
Used in examples: Dwelling size by construction period in Copenhagen (Example).
Task Schema (tool-agnostic)
-
Prepare the points — Point data is often primary data, e.g., from a register of dwellings, data points from loggers of agricultural machines, crime incident reports, and therefore they often need a thorough cleaning process before they can be used with any confidence; see categories from register codes.
-
Choose the zones (decision point) — zones differ in two ways: their form, regular cells or irregular areas, and their origin, predefined by someone else or built for this study.
Predefined Purpose-built Regular (grids) national and European statistical grids: the Danish Kvadratnet, the GISCO grid (Statistical Units) a grid made for the question, e.g. hexagons or 250 m squares (Operator: generate grid); see Square and hexagonal grids Irregular (areas) existing administrative and statistical units: municipalities, bydele, kvarterer, roder, NUTS zones drawn to capture a characteristic of the data: areas of high or low concentration, areas of a specific composition Predefined zones make the result comparable with official statistics and other studies; prefer them, or a grid aligned with a predefined grid, unless the question needs otherwise. Purpose-built zones fit the question but cannot be compared, and irregular ones drawn from the data itself can make almost any pattern appear — the same freedom that makes gerrymandering possible. Whatever the choice, the zones are part of the result, not a neutral container.
-
Summarise the points in each zone (Operator: summary by location) — choose the statistics by the role they play, and by the level of measurement of the field:
Role Statistics Fields Amount count, sum count: any; sum: ratio Central tendency — the typical value mode; median; mean mode: nominal; median: ordinal and up; mean: interval and ratio. The mean of a 0/1 indicator is a share. Dispersion — the spread around it range, interquartile range; variance, standard deviation, coefficient of variation interquartile range: ordinal and up; the others: interval and ratio (the coefficient of variation: ratio only) Shape of the distribution skewness (the Fisher–Pearson moment coefficient), kurtosis interval and ratio Specialised measures inequality: the Gini coefficient; diversity of categories: e.g. the Shannon index Gini: ratio; Shannon: nominal A central value alone hides how different the points in a zone are: two zones with the same mean dwelling size can hold one kind of dwelling or a mix of very small and very large. Report a measure of dispersion with it. Not every operator computes shape and specialised measures; they can be computed from the points grouped by zone (Operator: group-by statistics).
-
Check the sums — the counts over all zones against the number of points; points on borders or outside every zone explain differences.
-
Set a minimum count (decision point) — zones with too few points get no value (and are shown as such), because a mean of a handful of points is unreliable and can reveal individuals.
-
Derive what the map needs (Operator: attribute calculation) — e.g. a density from a count and the zone’s area.
Output: the zones with counts and summaries, and a flag for zones below the minimum count.
Epistemic Choices to record
- Which zones and why: a different set of zones gives a different map of the same points (the modifiable areal unit problem: the scale effect of zone size and the zoning effect of where the borders run). Try a second set before concluding.
- Mean or median: a few very large or very small units pull the mean; report the median where it differs.
- Minimum count: 20? 50? Name it and show the zones it hides.
- Never average averages upwards: a value for a larger zone is computed from the points again, or from sums and counts, never as the mean of smaller zones’ means.
- Which point: a dwelling placed on its building’s point or on its entrance’s address point can fall in different zones near a border.
- Ecological fallacy: a zone’s average describes the zone, not the people or dwellings in it.