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
Some checks failed
Deploy production / deploy (push) Failing after 54s
This commit is contained in:
26
scripts/stats/cbs-series.ts
Normal file
26
scripts/stats/cbs-series.ts
Normal 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[] = [];
|
||||
Reference in New Issue
Block a user