stats §8: CBS Curaçao collector (topic-page scrape, sha256 manifest, CPI since 1970 from PDF, GDP by industry, government finance, population since 1900, LFS, tourism) into cw_cbs_* + stats.obs region CUW; cw_cbcs_bop for manual uploads; weekly timer
Some checks failed
Deploy production / deploy (push) Has been cancelled
Some checks failed
Deploy production / deploy (push) Has been cancelled
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
// bun scripts/stats-fetch.ts energycharts|rijksfinancien|ustreasury [--backfill]
|
||||
// bun scripts/stats-fetch.ts usaspending
|
||||
// bun scripts/stats-fetch.ts eponline [--force] (needs EP_ONLINE_API_KEY)
|
||||
// bun scripts/stats-fetch.ts cbscw [--force] [--only=cpi,gdp,…] CBS Curaçao files
|
||||
// bun scripts/stats-fetch.ts normalise-cbs rebuild CBS chart series from the raw rows
|
||||
import { ensureMeta, sql } from './stats/common';
|
||||
import { cbs, normaliseCbs } from './stats/cbs';
|
||||
@@ -24,6 +25,7 @@ import { rijksfinancien } from './stats/rijksfinancien';
|
||||
import { ustreasury } from './stats/ustreasury';
|
||||
import { usaspending } from './stats/usaspending';
|
||||
import { eponline } from './stats/eponline';
|
||||
import { cwcbs } from './stats/cwcbs';
|
||||
|
||||
const [source, ...args] = process.argv.slice(2);
|
||||
const flag = (name: string) => args.includes(`--${name}`);
|
||||
@@ -69,12 +71,15 @@ try {
|
||||
case 'usaspending':
|
||||
await usaspending({ job });
|
||||
break;
|
||||
case 'cbscw':
|
||||
await cwcbs({ force: flag('force') || flag('backfill'), only: value('only'), job });
|
||||
break;
|
||||
case 'eponline':
|
||||
await eponline({ force: flag('force') || flag('backfill'), job });
|
||||
break;
|
||||
default:
|
||||
throw new Error(
|
||||
`Unknown source "${source}" (cbs, eurostat, fred, bis, worldbank, imf, owid, energycharts, rijksfinancien, ustreasury, usaspending, eponline, normalise-cbs)`
|
||||
`Unknown source "${source}" (cbs, eurostat, fred, bis, worldbank, imf, owid, energycharts, rijksfinancien, ustreasury, usaspending, eponline, cbscw, normalise-cbs)`
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user