stats: index neighbour growth from 2016 (after mergers), clearer tariff and levy labels
All checks were successful
Deploy production / deploy (push) Successful in 1m9s

This commit is contained in:
2026-10-25 20:56:29 +00:00
parent 76bfb3dcec
commit 7e905b1651
2 changed files with 14 additions and 7 deletions

View File

@@ -173,7 +173,11 @@
}, },
{ name: 'Variable + tax 2018–2022', points: elec1823, color: '#eab308', dashed: true }, { name: 'Variable + tax 2018–2022', points: elec1823, color: '#eab308', dashed: true },
{ name: 'Variable + tax (new contracts)', points: elecAllIn, color: '#eab308' }, { name: 'Variable + tax (new contracts)', points: elecAllIn, color: '#eab308' },
{ name: 'Dynamic contract', points: pts('cbs:tariff:elec:dynamic'), color: '#10b981' } {
name: 'Dynamic contract (supply only)',
points: pts('cbs:tariff:elec:dynamic'),
color: '#10b981'
}
], ],
{ unit: '€/kWh', decimals: 3, zoom: true } { unit: '€/kWh', decimals: 3, zoom: true }
)} )}

View File

@@ -42,9 +42,12 @@
const social = $derived(last('cbs:stock:social:GM0513')); const social = $derived(last('cbs:stock:social:GM0513'));
const levy = $derived(last('cbs:levy:total:GM0513')); const levy = $derived(last('cbs:levy:total:GM0513'));
// Index every ring municipality's monthly population to 100 in Jan 2002 so sizes compare. // Index every ring municipality's monthly population to 100 in Jan 2016 so sizes compare.
const indexed = (p: StatPoint[]): StatPoint[] => // CBS reports historical borders, so start after the last merger (Krimpenerwaard, 2015).
p.length ? p.map(([d, v]) => [d, Math.round((v / p[0][1]) * 1000) / 10]) : []; const indexed = (all: StatPoint[]): StatPoint[] => {
const p = all.filter(([d]) => d >= '2016-01-01');
return p.map(([d, v]) => [d, Math.round((v / p[0][1]) * 1000) / 10] as StatPoint);
};
const levyRank = $derived( const levyRank = $derived(
RING.map((r) => ({ r, p: last(`cbs:levy:total:${r}`) })) RING.map((r) => ({ r, p: last(`cbs:levy:total:${r}`) }))
.filter((x) => x.p) .filter((x) => x.p)
@@ -164,8 +167,8 @@
)} )}
/> />
<StatChart <StatChart
title="Growth since 2002, Gouda and its neighbours" title="Growth since 2016, Gouda and its neighbours"
subtitle="monthly population, January 2002 = 100" subtitle="monthly population, January 2016 = 100"
sources={['cbs']} sources={['cbs']}
attributions={a} attributions={a}
option={(t) => option={(t) =>
@@ -293,7 +296,7 @@
/> />
<StatChart <StatChart
title="Municipal levies" title="Municipal levies"
subtitle={`€ per multi-person household (property tax, sewer, waste) · ${period(levy?.[0], 'A')}`} subtitle={`total municipal housing charges, € per multi-person household · ${period(levy?.[0], 'A')}`}
sources={['cbs']} sources={['cbs']}
attributions={a} attributions={a}
option={(t) => barRankOption(t, levyRank, { decimals: 0, unit: '€', color: '#64748b' })} option={(t) => barRankOption(t, levyRank, { decimals: 0, unit: '€', color: '#64748b' })}