stats: index neighbour growth from 2016 (after mergers), clearer tariff and levy labels
Deploy production / deploy (push) Successful in 1m9s
Deploy production / deploy (push) Successful in 1m9s
This commit is contained in:
1 parent
76bfb3dcec
commit
7e905b1651
2 files changed
+14
-7
No files matched your search
@@ -42,9 +42,12 @@
|
||||
const social = $derived(last('cbs:stock:social:GM0513'));
|
||||
const levy = $derived(last('cbs:levy:total:GM0513'));
|
||||
|
||||
// Index every ring municipality's monthly population to 100 in Jan 2002 so sizes compare.
|
||||
const indexed = (p: StatPoint[]): StatPoint[] =>
|
||||
p.length ? p.map(([d, v]) => [d, Math.round((v / p[0][1]) * 1000) / 10]) : [];
|
||||
// Index every ring municipality's monthly population to 100 in Jan 2016 so sizes compare.
|
||||
// CBS reports historical borders, so start after the last merger (Krimpenerwaard, 2015).
|
||||
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(
|
||||
RING.map((r) => ({ r, p: last(`cbs:levy:total:${r}`) }))
|
||||
.filter((x) => x.p)
|
||||
@@ -164,8 +167,8 @@
|
||||
)}
|
||||
/>
|
||||
<StatChart
|
||||
title="Growth since 2002, Gouda and its neighbours"
|
||||
subtitle="monthly population, January 2002 = 100"
|
||||
title="Growth since 2016, Gouda and its neighbours"
|
||||
subtitle="monthly population, January 2016 = 100"
|
||||
sources={['cbs']}
|
||||
attributions={a}
|
||||
option={(t) =>
|
||||
@@ -293,7 +296,7 @@
|
||||
/>
|
||||
<StatChart
|
||||
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']}
|
||||
attributions={a}
|
||||
option={(t) => barRankOption(t, levyRank, { decimals: 0, unit: '€', color: '#64748b' })}
|
||||
|
||||
Reference in new issue
Block a user