stats: place × theme matrix (/stats/<place>/<theme>), sticky place/theme selector, generic metric engine with comparisons, 301s from the old section URLs
Deploy production / deploy (push) Successful in 1m19s

This commit is contained in:
stan committed 2026-10-26 17:37:47 +00:00
1 parent 7ba26f132d
commit f2f7bd0a19
51 files changed
+2234 -837

No files matched your search

+15 -19
View File
@@ -34,70 +34,66 @@ export const projects = [
}
] as const;
// The public /stats section: open data on the economy, energy and Gouda (src/routes/stats).
// The public /stats section (src/routes/stats): a place × theme matrix; these are the shortcuts.
export const statsPages = [
{
name: 'economy',
icon: 'stats-economy',
subtitle: 'rates, inflation, bond spreads, GDP and debt',
href: '/stats/economy',
href: '/stats/core/economy',
external: false
},
{
name: 'jobs & cost of living',
icon: 'stats-jobs',
subtitle: 'unemployment, vacancies, graduate outcomes, wages, rents and price levels',
href: '/stats/core/jobs',
external: false
},
{
name: 'energy',
icon: 'stats-energy',
subtitle: 'live grid mix and gas storage, tariffs, oil and gas, renewables, heat pumps and EVs',
href: '/stats/energy',
href: '/stats/nld/energy',
external: false
},
{
name: 'gouda',
icon: 'stats-gouda',
subtitle: 'population, housing and neighbourhoods in Gouda',
href: '/stats/gouda',
href: '/stats/gouda/overview',
external: false
},
{
name: 'countries',
icon: 'stats-countries',
subtitle: 'the Netherlands, Curaçao, the US, Korea, China and more side by side',
href: '/stats/countries',
href: '/stats/core/overview',
external: false
},
{
name: 'elections',
icon: 'stats-elections',
subtitle: 'Dutch elections since 1918, Gouda per polling station, US presidential',
href: '/stats/elections',
href: '/stats/nld/politics',
external: false
},
{
name: 'history',
icon: 'stats-history',
subtitle: 'the long run, a sourced timeline, politics and culture of five places',
href: '/stats/history',
href: '/stats/world/history',
external: false
},
{
name: 'opinions',
icon: 'stats-opinions',
subtitle: 'polls, Eurobarometer, happiness, party positions and world opinions',
href: '/stats/opinions',
href: '/stats/core/politics',
external: false
}
] as const;
/** Sub-tabs of a /stats section (second row under the stats nav), keyed by the section path. */
export const statsSubPages: Record<
string,
readonly { name: string; href: string; icon: string }[]
> = {
'/stats/opinions': [
{ name: 'polls & surveys', href: '/stats/opinions', icon: 'stats-polls' },
{ name: 'world', href: '/stats/opinions/world', icon: 'stats-world' }
]
};
type Tracker = {
name: string;
subtitle: string;