stats: new public stats schema (source/series/obs/region/fetch_run + raw CBS, Eurostat, FRED, BIS tables) and the stats collector (scripts/stats-fetch.ts); preflight checks the stats tables
Some checks failed
Deploy production / deploy (push) Failing after 54s

This commit is contained in:
2026-10-25 20:27:04 +00:00
parent 902b1cadd5
commit 8ef291f586
14 changed files with 33128 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
// Chart series normalised from the raw CBS rows (stats.cbs_obs → stats.series/obs).
// `dims` must match the observation's dimension codes exactly (see stats.cbs_code for titles).
import { GOUDA_RING } from './common';
export type CbsSeriesDef = {
id: string;
table: string;
measure: string;
dims?: Record<string, string>;
freq: 'M' | 'Q' | 'S' | 'A';
title: string;
unit: string;
theme: string;
region?: string;
/** Expand into one series per region (id suffixed with :<code>). */
regionDim?: string;
regions?: { code: string; region: string }[];
scale?: number;
};
export const RING = [
{ code: 'NL01', region: 'NLD' },
...GOUDA_RING.map((code) => ({ code, region: code }))
];
export const CBS_SERIES: CbsSeriesDef[] = [];