garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /docs/notes/cbs-neighbourhood-statistics.md

raw


topic: cbs-neighbourhood-statistics triggers: [CBS, wijkenbuurten, buurten, wijken, gemeenten, "neighbourhood statistics", "population density", aantalInwoners, bevolkingsdichtheid, personenautosPerKm2, percentageOnbewoond, PDOK, place_labels, pipeline/mod.rs, systems/nav/traffic.rs, systems/map/building_windows.rs, parking.rs] updated: 2026-08-29

CBS neighbourhood statistics: checked against the live service, and not taken

The frontier row asked "how many people are actually there". The data exists, is free, and is tiny — and it still loses, because there is no picture in it. Checked 2026-08-29 against https://service.pdok.nl/cbs/wijkenbuurten/2024/wfs/v1_0 (WFS 2.0), three feature types: buurten (neighbourhoods), wijken (districts), gemeenten (municipalities). A 2023 service of the same shape sits beside it.

The licence is CC0 1.0, read off the service's own GetCapabilities — ows:AccessConstraints is https://creativecommons.org/publicdomain/zero/1.0/deed.nl and ows:Fees is none — not off a wiki. As with Kadaster and NWB, the licence was never the obstacle; this was rejected on content.

What it costs, and what is in the bytes

Over bbox=6.555,53.207,6.580,53.222 — the same ~1.7 × 1.7 km of Groningen centre the Kadaster and NWB checks used, comparable to a z14 surveyed cell:

Feature typeFeatures
buurten23
wijken6
gemeenten1

The buurten GeoJSON is 257,021 bytes, of which the geometry is 27,582 — 696 coordinate pairs across 22 features, i.e. heavily generalised administrative outlines. So 89% of the payload is the statistics table: 244 attributes per feature, 5,368 values in the response, of which 1,614 (30%) are the suppression sentinel -99997. That ratio is the finding: this is not a heavy source that has to be trimmed, it is a light one that is almost entirely table.

Why it lost: no object, and every consumer already reads something finer

The only geometry is the buurt/wijk/gemeente outline, which is an administrative line with no physical object standing on it — precisely why the cadastre lost (value 1, kadaster-parcels.md). Everything else is data behind the picture rather than picture, which kadaster-parcels.md already applied value 6 to when it ruled out plot area.

The strongest case for taking it is value 1 the other way round — ground an invented density in a measured one. It fails at all three candidate consumers:

Parked cars are already sized from the lot's own surveyed area (crates/geo/src/parking.rs:11-12), which is finer than a buurt aggregate.

Paging: the same family as the Kadaster service

PagingIsTransactionSafe = FALSE, CountDefault = 1000. resultType=hits says 23 buurten; page 0 returns 22 (all ids unique), and startIndex=22 returns Sterrebosbuurt — the last feature of page 0 again, a duplicate rather than the missing 23rd. Any extractor would have to de-duplicate on id and reconcile against hits, exactly as the paging section of kadaster-parcels.md records. Not restated here.

Pointers, with what was and was not verified

How every number above was measured

All read-only, all run 2026-08-29 from the agent container.

B=https://service.pdok.nl/cbs/wijkenbuurten/2024/wfs/v1_0
BB=53.207,6.555,53.222,6.580,urn:ogc:def:crs:EPSG::4326
G="service=WFS&version=2.0.0&request=GetFeature&typeNames=wijkenbuurten"

# Licence, fees, the three feature types, CountDefault=1000, paging FALSE.
curl -sL "$B?request=GetCapabilities&service=WFS" > caps.xml
grep -oE 'publicdomain/zero/1.0[^<]*|<ows:Fees>[^<]*|<Name>wijkenbuurten:[^<]*' caps.xml
grep -A3 'PagingIsTransactionSafe\|name="CountDefault"' caps.xml

# The only honest total. → 23, 6, 1.
for T in buurten wijken gemeenten; do
  curl -sL "$B?$G:$T&resultType=hits&bbox=$BB" | grep -o 'numberMatched="[0-9]*"'
done

# Volume and the table/geometry split. → 257021 / 22 / 27582 / 5368 / 1614 / 244.
J="$G:buurten&outputFormat=application/json&srsName=urn:ogc:def:crs:EPSG::4326"
curl -sL "$B?$J&bbox=$BB&count=1000" -o buurten.json -w '%{size_download}\n'
jq '.features|length'                                                buurten.json
jq '[.features[]|.geometry|tostring|length]|add'                     buurten.json
jq '[.features[].properties|to_entries[]]|length'                    buurten.json
jq '[.features[].properties|to_entries[]|select(.value==-99997)]|length' buurten.json
jq '.features[0].properties|length'                                  buurten.json

# The duplicate page. → one feature, "Sterrebosbuurt", same as page 0's last.
curl -sL "$B?$J&bbox=$BB&count=1000&startIndex=22" \
  | jq '[.features[].properties.buurtnaam]'