27 lines
746 B
TypeScript
27 lines
746 B
TypeScript
// 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[] = [];
|