Add hourly usage snapshots, analysis layer, scorecard, tooltips & guided tour

- data-pipeline: hourly NDW snapshot job (occupancy + status) + GitHub Action;
  per-gemeente day files, current-status, daily-average rollup.
- webapp: usage-over-day chart in detail panel; fresh per-gemeente status colours;
  national analysis choropleth (LayerSwitcher) + gemeente scorecard with demand
  (peer-model), siting priority, congestion and live/potential net-impact scenario.
- analysis/ (Python): golden dataset (CBS Kerncijfers + chargers) -> derived
  metrics + models (demand, siting, congestion, municipal percentiles).
- UX: InfoTip tooltips throughout, expanded methodology modal, interactive
  guided tour (spotlight + blur) that drives the app to example screens.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Robbert Janssen
2026-06-02 22:01:28 +02:00
co-authored by Claude Opus 4.8
parent 55ecd88b78
commit 800ad823e9
717 changed files with 2839 additions and 54 deletions
+10 -2
View File
@@ -3,22 +3,27 @@
import { X, ExternalLink, Clock, Zap, MapPin, Building2, Truck } from "lucide-react";
import type { ChargeFeature, EnrichedLocation } from "@/types/charging";
import { formatConnectorStandard, formatPowerType, statusColorClass, statusLabel } from "@/lib/connectorLabels";
import UsageChart from "@/components/UsageChart";
interface Props {
selected: ChargeFeature | null;
detail: EnrichedLocation | null;
loading: boolean;
slug?: string; // gemeente slug for usage history (undefined / 'nederland' = no chart)
onClose: () => void;
onJumpToGemeente?: () => void;
}
export default function LocationDetailPanel({ selected, detail, loading, onClose, onJumpToGemeente }: Props) {
export default function LocationDetailPanel({ selected, detail, loading, slug, onClose, onJumpToGemeente }: Props) {
if (!selected) return null;
const p = selected.properties;
const isFreight = p.layer === "freight";
return (
<div className="absolute top-4 right-14 w-96 max-w-[calc(100vw-5rem)] max-h-[calc(100%-2rem)] bg-white rounded-lg shadow-lg overflow-hidden flex flex-col z-10">
<div
data-tour="detail"
className="absolute top-4 right-14 w-96 max-w-[calc(100vw-5rem)] max-h-[calc(100%-2rem)] bg-white rounded-lg shadow-lg overflow-hidden flex flex-col z-10"
>
<div className="p-4 border-b bg-gray-50 flex-shrink-0">
<div className="flex justify-between items-start">
<div className="flex-1 min-w-0">
@@ -76,6 +81,9 @@ export default function LocationDetailPanel({ selected, detail, loading, onClose
</div>
</div>
{/* Usage over time (gemeente view only; per-gemeente snapshot history) */}
{slug && slug !== "nederland" && <UsageChart slug={slug} locationId={p.locationId} />}
{loading && (
<div className="text-sm text-gray-500 italic flex items-center gap-2">
<span className="animate-spin h-4 w-4 border-2 border-gray-300 border-t-gray-600 rounded-full" />