Files
laadpalenviewer/analysis
robbertjanssen85andClaude Fable 5 cbd4531574 Rework freight classification and fix analysis/webapp derivations
Freight classification v2: two-tier freightKind ('dedicated' via truck
operator, truck-named location (forklifts excluded), MCS, logistics depot
>=150 kW DC, or curated hub; 'hpc' for power-only >=350 kW DC) with
freightReason carried through to the map and detail panel. Connector power
is now derived from V x A when max_electric_power is missing or implausible
(caps out NDW garbage like 7.36 MW on a 22 kW AC post), eliminating all
zero-kW points. Adds Milence Waddinxveen to curated hubs and a
nearest-gemeente fallback so coastal/industrial sites get detail bundles.
Tariff matching now honors one-sided time windows.

Analysis: peak load finally uses the 150 kW freight constant (was priced at
11 kW), crop stats split by layer so freight no longer skews supply/price
metrics, occupancy is EVSE-weighted, charging_now samples one common hour,
and a new Logistiek metric group exports chargers_freight/freight_dedicated/
freight_power_kw. Relabels peer-model outputs as modelled supply.

Webapp: freight markers colored by kind with status ring, dedicated-only
filter, filter counts respect the power filter, status tallies scoped to
passenger, national-view detail panel can jump into the point's gemeente,
connector kW display mirrors the pipeline derivation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 01:08:54 +02:00
..

Laadpalenviewer — analysis (golden dataset)

Python layer that integrates open Dutch datasets into a "golden dataset" and exports derived map layers consumed by the webapp. Phase 1 works at gemeente grain; buurt/PC4 grain and more sources (BAG/BGT, NDW traffic, grid) follow.

Sources (open tier)

  • CBS Kerncijfers wijken en buurten 85984NED (CC-BY) — demographics, income, urbanisation, car ownership. Field keys live in src/ingest/cbs.py.
  • Charger supply/usage — our own webapp/public/data (municipalities.json, crop-out GeoJSONs, hourly snapshots).
  • PDOK CBS Gebiedsindelingen — gemeente polygons for the choropleth.

Run

cd analysis
python3 -m venv .venv && ./.venv/bin/pip install -r requirements.txt
./.venv/bin/python -m src.main            # uses caches in .cache/
./.venv/bin/python -m src.main --refresh  # re-fetch CBS/PDOK

Outputs:

  • data/gold_gemeente.{csv,parquet} — the golden dataset (gitignored).
  • webapp/public/data/derived/gemeente-metrics.geojson — choropleth layer (committed).
  • webapp/public/data/derived/metrics-meta.json — metric list for the viewer.

The viewer's Analyse (per gemeente) switcher (national view) renders any metric as a choropleth. Attribution: data © CBS (CC-BY), PDOK, NDW.