stats: /stats overview, economy, energy and Gouda pages; CBS series map; nav, homepage, /start and sitemap links
All checks were successful
Deploy production / deploy (push) Successful in 1m10s
All checks were successful
Deploy production / deploy (push) Successful in 1m10s
- CBS_SERIES: CPI, household tariffs (2007-now), energy balance, renewables, heat pumps, solar, cars, population (monthly, since 1942, components), house prices, housing stock, municipal levies for Gouda and its neighbours - shared StatChart/Kpi/chart helpers with per-chart source attribution - drop Eurostat nrg_pc_20x_h (404; CBS covers that history)
This commit is contained in:
58
src/routes/stats/energy/+page.server.ts
Normal file
58
src/routes/stats/energy/+page.server.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import { cached, loadSeries } from '#lib/server/stats.js';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
const EU = ['NL', 'DE', 'FR', 'BE', 'IT', 'ES', 'PL', 'SE', 'DK', 'AT', 'EU27_2020'];
|
||||
const RENEW = ['total', 'wind-onshore', 'wind-offshore', 'solar', 'biomass', 'hydro'];
|
||||
|
||||
export const load: PageServerLoad = async () => ({
|
||||
series: await cached('stats:energy', () =>
|
||||
loadSeries([
|
||||
...['variable', 'tax', 'transport', 'fixed', 'taxcredit', 'dynamic'].map(
|
||||
(k) => `cbs:tariff:elec:${k}`
|
||||
),
|
||||
...['variable', 'tax', 'transport', 'fixed'].map((k) => `cbs:tariff:gas:${k}`),
|
||||
...['variable', 'tax', 'ode'].flatMap((k) => [
|
||||
`cbs:tariff1823:elec:${k}`,
|
||||
`cbs:tariff1823:gas:${k}`
|
||||
]),
|
||||
'cbs:price0723:elec',
|
||||
'cbs:price0723:gas',
|
||||
'cbs:cpi:energy:yoy',
|
||||
...EU.flatMap((g) => [
|
||||
`eurostat:nrg_pc_204:E7000.KWH2500-4999.KWH.I_TAX.EUR.${g}`,
|
||||
`eurostat:nrg_pc_202:G3000.GJ20-199.KWH.I_TAX.EUR.${g}`,
|
||||
`eurostat:nrg_ind_id:TOTAL.PC.${g}`
|
||||
]),
|
||||
...['X_TAX', 'X_VAT'].flatMap((t) => [
|
||||
`eurostat:nrg_pc_204:E7000.KWH2500-4999.KWH.${t}.EUR.NL`,
|
||||
`eurostat:nrg_pc_202:G3000.GJ20-199.KWH.${t}.EUR.NL`
|
||||
]),
|
||||
{ id: 'fred:APU000072610', from: '2007-01-01' },
|
||||
{ id: 'fred:DCOILBRENTEU', resample: 'W' },
|
||||
'fred:PNGASEUUSDM',
|
||||
'cbs:energy:tpes',
|
||||
'cbs:energy:netimport',
|
||||
'cbs:energy:production',
|
||||
'cbs:energy:gas:production',
|
||||
'cbs:energy:gas:netimport',
|
||||
'cbs:energy:gas:tpes',
|
||||
...RENEW.flatMap((k) => [`cbs:renew:${k}:share`, `cbs:renew:${k}:mw`]),
|
||||
'cbs:heatpumps:homes',
|
||||
'cbs:heatpumps:homes:air',
|
||||
'cbs:heatpumps:homes:ground',
|
||||
'cbs:heatpumps:new',
|
||||
...['NL01', 'GM0513'].flatMap((r) => [
|
||||
`cbs:solar:homes:kwp:${r}`,
|
||||
`cbs:solar:homes:n:${r}`,
|
||||
`cbs:solar:kwp:${r}`
|
||||
]),
|
||||
'cbs:pop:jan1:GM0513',
|
||||
'cbs:cars:total',
|
||||
'cbs:cars:electric',
|
||||
'cbs:cars:petrol',
|
||||
'cbs:cars:diesel',
|
||||
'eurostat:road_eqr_carpda:NR.ELC.NL',
|
||||
'eurostat:road_eqr_carpda:NR.TOTAL.NL'
|
||||
])
|
||||
)
|
||||
});
|
||||
Reference in New Issue
Block a user