stats B11: EP-Online energy labels (monthly total file → homes per label for NL, Gouda, Gouda PC4s; aggregates only), stats.ep_label_agg, monthly timer with key from ~/.config/stats/ep-online.env, charts on /stats/energy and /stats/gouda
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:
@@ -9,6 +9,7 @@
|
||||
// bun scripts/stats-fetch.ts worldbank|imf|owid [--only=…]
|
||||
// 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 normalise-cbs rebuild CBS chart series from the raw rows
|
||||
import { ensureMeta, sql } from './stats/common';
|
||||
import { cbs, normaliseCbs } from './stats/cbs';
|
||||
@@ -22,6 +23,7 @@ import { energycharts } from './stats/energycharts';
|
||||
import { rijksfinancien } from './stats/rijksfinancien';
|
||||
import { ustreasury } from './stats/ustreasury';
|
||||
import { usaspending } from './stats/usaspending';
|
||||
import { eponline } from './stats/eponline';
|
||||
|
||||
const [source, ...args] = process.argv.slice(2);
|
||||
const flag = (name: string) => args.includes(`--${name}`);
|
||||
@@ -67,9 +69,12 @@ try {
|
||||
case 'usaspending':
|
||||
await usaspending({ 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, normalise-cbs)`
|
||||
`Unknown source "${source}" (cbs, eurostat, fred, bis, worldbank, imf, owid, energycharts, rijksfinancien, ustreasury, usaspending, eponline, normalise-cbs)`
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user