From 0a2c903e5c907d5d4a2ad69acad218bb378229cd Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Sat, 18 Apr 2026 07:05:31 +0200 Subject: [PATCH] feat(substrate): add DE-Common-Metrics dataset template --- Data/DE-Common-Metrics/DE-Common-Metrics.md | 150 ++++++++++++++++++++ Data/DE-Common-Metrics/README.md | 31 ++++ Data/DE-Common-Metrics/source.md | 51 +++++++ 3 files changed, 232 insertions(+) create mode 100644 Data/DE-Common-Metrics/DE-Common-Metrics.md create mode 100644 Data/DE-Common-Metrics/README.md create mode 100644 Data/DE-Common-Metrics/source.md diff --git a/Data/DE-Common-Metrics/DE-Common-Metrics.md b/Data/DE-Common-Metrics/DE-Common-Metrics.md new file mode 100644 index 0000000..612615a --- /dev/null +++ b/Data/DE-Common-Metrics/DE-Common-Metrics.md @@ -0,0 +1,150 @@ +# DE Common Metrics + +**Last Updated:** -- +**Data Sources:** Destatis GENESIS, Bundesbank, BA fuer Arbeit, ZEW +**Coverage:** 58 key German economic and social indicators + +--- + +## Quick Reference Dashboard + +| Category | Key Metric | Value | Updated | Trend | +|----------|------------|-------|---------|-------| +| Economy | GDP Growth QoQ (BIP-Wachstum QoQ) | -- | -- | -- | +| Inflation | CPI All Items (VPI Gesamt) | -- | -- | -- | +| Employment | Unemployment Rate (Arbeitslosenquote) | -- | -- | -- | +| Housing | 10-Year Mortgage Rate (Hypothekenzinsen 10J) | -- | -- | -- | +| Markets | ECB Key Rate (EZB-Leitzins) | -- | -- | -- | +| Consumer | ZEW Economic Expectations (ZEW Konjunkturerwartungen) | -- | -- | -- | +| Fiscal | Government Debt Total (Staatsverschuldung) | -- | -- | -- | +| Energy | Fuel Price Regular (Benzinpreis) | -- | -- | -- | + +*Values updated automatically via `bun ~/.claude/skills/Metrics/Tools/UpdateMetrics.ts --country de`* + +--- + +## 1. Wirtschaftsleistung & Wachstum — Economic Output + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| Real GDP (Bruttoinlandsprodukt real) | -- | -- | -- | Bundesbank | DE_GDP_REAL | +| Nominal GDP (Bruttoinlandsprodukt nominal) | -- | -- | -- | Bundesbank | DE_GDP_NOM | +| GDP Growth QoQ (BIP-Wachstum QoQ) | -- | -- | -- | Bundesbank | DE_GDP_QOQ | +| GDP Growth YoY (BIP-Wachstum YoY) | -- | -- | -- | Bundesbank | DE_GDP_YOY | +| Industrial Production Index (Industrieproduktion) | -- | -- | -- | Destatis | DE_INDPRO | +| Capacity Utilization (Kapazitaetsauslastung) | -- | -- | -- | Bundesbank | DE_CAPUTIL | +| Factory Orders (Auftragseingang Industrie) | -- | -- | -- | Destatis | DE_ORDERS | +| Retail Sales (Einzelhandelsumsatz) | -- | -- | -- | Destatis | DE_RETAIL | + +--- + +## 2. Inflation & Preise — Inflation & Prices + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| CPI All Items (VPI Gesamt) | -- | -- | -- | Destatis | DE_CPI | +| Core CPI ex Food/Energy (VPI Kernrate) | -- | -- | -- | Bundesbank | DE_CORE_CPI | +| Producer Price Index (Erzeugerpreisindex) | -- | -- | -- | Destatis | DE_PPI | +| Import Price Index (Importpreisindex) | -- | -- | -- | Destatis | DE_IMPORT_PRICE | +| Fuel Price Regular (Benzinpreis) | -- | -- | -- | Destatis | DE_GAS_PRICE | +| WTI Crude Oil (Rohoel WTI) | -- | -- | -- | Bundesbank | DE_OIL_WTI | + +--- + +## 3. Beschaeftigung & Arbeitsmarkt — Employment + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| Unemployment Rate (Arbeitslosenquote) | -- | -- | -- | BA fuer Arbeit | DE_UNRATE | +| Employment Rate (Erwerbstaetigenquote) | -- | -- | -- | BA fuer Arbeit | DE_EMPRATE | +| Job Openings (Offene Stellen) | -- | -- | -- | BA fuer Arbeit | DE_JOLTS | +| BA Employment Index (Stellenindex BA-X) | -- | -- | -- | BA fuer Arbeit | DE_BAX | +| Short-time Workers (Kurzarbeiter) | -- | -- | -- | BA fuer Arbeit | DE_KURZARBEIT | +| Labor Force (Erwerbspersonenpotenzial) | -- | -- | -- | Destatis | DE_LABFORCE | +| Average Wage (Durchschnittslohn) | -- | -- | -- | Destatis | DE_AVG_WAGE | +| Average Weekly Hours (Wochenarbeitszeit) | -- | -- | -- | Destatis | DE_AVG_HOURS | + +--- + +## 4. Wohnen & Immobilien — Housing + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| House Price Index (Immobilienpreisindex Haeuser) | -- | -- | -- | Bundesbank | DE_HOUSE_IDX | +| Apartment Price Index (Immobilienpreisindex Wohnungen) | -- | -- | -- | Bundesbank | DE_APT_IDX | +| Housing Completions (Baufertigstellungen) | -- | -- | -- | Destatis | DE_COMPLETIONS | +| Building Permits (Baugenehmigungen) | -- | -- | -- | Destatis | DE_PERMITS | +| 10-Year Mortgage Rate (Hypothekenzinsen 10J) | -- | -- | -- | Bundesbank | DE_MORTGAGE | + +--- + +## 5. Konsumenten & Privatfinanzen — Consumer & Personal Finance + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| ZEW Economic Expectations (ZEW Konjunkturerwartungen) | -- | -- | -- | ZEW | DE_ZEW_EXPECT | +| ZEW Current Situation (ZEW Aktuelle Lage) | -- | -- | -- | ZEW | DE_ZEW_CURRENT | +| Disposable Income (Verfuegbares Einkommen) | -- | -- | -- | Bundesbank | DE_DISP_INC | +| Savings Rate (Sparquote) | -- | -- | -- | Bundesbank | DE_SAVE_RATE | +| Consumer Spending (Konsumausgaben) | -- | -- | -- | Bundesbank | DE_CONSUMPTION | +| Household Debt (Verschuldung Haushalte) | -- | -- | -- | Bundesbank | DE_HH_DEBT | + +--- + +## 6. Finanzmärkte — Financial Markets + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| ECB Key Rate (EZB-Leitzins) | -- | -- | -- | Bundesbank | DE_ECB_RATE | +| 10-Year Bund Yield (10J-Bundrendite) | -- | -- | -- | Bundesbank | DE_BUND10 | +| 2-Year Bund Yield (2J-Bundrendite) | -- | -- | -- | Bundesbank | DE_BUND2 | +| 10Y-2Y Spread (Spread 10J-2J) | -- | -- | -- | Bundesbank | DE_BUND_SPREAD | +| EUR/USD Exchange Rate (EUR/USD Wechselkurs) | -- | -- | -- | Bundesbank | DE_EURUSD | +| DAX Index | -- | -- | -- | Bundesbank | DE_DAX | +| VDAX Volatility Index | -- | -- | -- | Bundesbank | DE_VDAX | + +--- + +## 7. Aussenhandel — Trade + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| Trade Balance (Handelsbilanz) | -- | -- | -- | Destatis | DE_TRADE_BAL | +| Total Exports (Exporte gesamt) | -- | -- | -- | Destatis | DE_EXPORTS | +| Total Imports (Importe gesamt) | -- | -- | -- | Destatis | DE_IMPORTS | +| EUR Exchange Rate Index (EUR Wechselkursindex) | -- | -- | -- | Bundesbank | DE_EUR_IDX | + +--- + +## 8. Staatsfinanzen — Government & Fiscal + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| Government Debt Total (Staatsverschuldung) | -- | -- | -- | Bundesbank | DE_DEBT_ABS | +| Debt-to-GDP Ratio (Schuldenquote) | -- | -- | -- | Bundesbank | DE_DEBT_GDP | +| Government Revenue (Staatseinnahmen) | -- | -- | -- | Bundesbank | DE_GOV_REV | +| Government Expenditure (Staatsausgaben) | -- | -- | -- | Bundesbank | DE_GOV_EXP | +| Budget Balance (Budgetsaldo) | -- | -- | -- | Bundesbank | DE_BUDGET | + +--- + +## 9. Demografie & Soziales — Demographics + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| Total Population (Bevoelkerung) | -- | -- | -- | Destatis | DE_POP | +| GINI Index (Gini-Koeffizient) | -- | -- | -- | Destatis | DE_GINI | +| Median Household Income (Medianeinkommen) | -- | -- | -- | Destatis | DE_MEDIAN_INC | +| Poverty Rate (Armutsquote) | -- | -- | -- | Destatis | DE_POVERTY | +| Birth Rate (Geburtenrate) | -- | -- | -- | Destatis | DE_BIRTH_RATE | + +--- + +## 10. Gesundheit & Gesellschaft — Health & Society + +| Metric | Value | Period | Updated | Source | ID | +|--------|-------|--------|---------|--------|----| +| Life Expectancy (Lebenserwartung) | -- | -- | -- | Destatis | DE_LIFE_EXP | +| Mortality Rate (Sterblichkeitsrate) | -- | -- | -- | Destatis | DE_MORTALITY | +| Suicide Rate (Suizidrate) | -- | -- | -- | Destatis | DE_SUICIDE | +| Air Quality PM2.5 (Luftqualitaet) | -- | -- | -- | Destatis | DE_AIR_PM25 | diff --git a/Data/DE-Common-Metrics/README.md b/Data/DE-Common-Metrics/README.md new file mode 100644 index 0000000..536d192 --- /dev/null +++ b/Data/DE-Common-Metrics/README.md @@ -0,0 +1,31 @@ +# DE-Common-Metrics + +German economic and social indicators for the Substrate dataset. + +**58 metrics across 10 categories** + +## Sources + +- [Destatis GENESIS](https://www-genesis.destatis.de/) — official German statistics (GDP, CPI, employment, housing, demographics, health) +- [Bundesbank](https://api.bundesbank.de/) — monetary and financial data (interest rates, yields, exchange rates, asset prices) +- [BA fuer Arbeit](https://rest.arbeitsagentur.de/) — employment statistics (unemployment rate, job openings, short-time work) +- [ZEW](https://www.zew.de/) — economic sentiment surveys (expectations, current situation) + +## Update + +```bash +bun ~/.claude/skills/Metrics/Tools/UpdateMetrics.ts --country de +``` + +## Files + +- `DE-Common-Metrics.md` — current values dashboard (updated by UpdateMetrics) +- `de-metrics-current.csv` — machine-readable current snapshot (created on first run) +- `de-metrics-historical.csv` — appended time series (created on first run) +- `source.md` — methodology and API documentation + +## Notes + +- SeriesIDs for Destatis GENESIS are estimates and may need correction after first live run +- Bundesbank SDMX-REST series keys are standard and should work without correction +- BA fuer Arbeit and ZEW use documented public endpoints diff --git a/Data/DE-Common-Metrics/source.md b/Data/DE-Common-Metrics/source.md new file mode 100644 index 0000000..b68d9a6 --- /dev/null +++ b/Data/DE-Common-Metrics/source.md @@ -0,0 +1,51 @@ +# DE-Common-Metrics — Source Documentation + +## Data Sources + +### Destatis GENESIS +- **URL:** https://www-genesis.destatis.de/ +- **Auth:** Username + Password (DESTATIS_USERNAME, DESTATIS_PASSWORD in ~/.claude/.env) +- **Format:** REST JSON, table code + dimension filters +- **Rate limit:** ~1.5 req/s authenticated; skill uses 600ms delay +- **Metrics:** Industrial production, CPI, PPI, import prices, fuel prices, housing, labor force, wages, trade, demographics, health + +### Bundesbank SDMX-REST +- **URL:** https://api.bundesbank.de/service/data/ +- **Auth:** None required (public API) +- **Format:** SDMX-JSON, Accept: application/json header +- **Rate limit:** No documented limit; skill uses 200ms delay +- **Metrics:** GDP, capacity utilization, core CPI, WTI oil, mortgage rates, house prices, yields, exchange rates, DAX, fiscal aggregates, consumer income/savings + +### BA fuer Arbeit REST +- **URL:** https://rest.arbeitsagentur.de/infosysbub/ +- **Auth:** None required (public API) +- **Format:** JSON with _embedded.statistiken structure +- **Rate limit:** 1 req/s documented; skill uses 1100ms delay +- **Metrics:** Unemployment rate, employment rate, job openings, BA-X index, short-time workers + +### ZEW Economic Sentiment +- **URL:** https://www.zew.de/en/publications/zew-indicator-of-economic-sentiment +- **Auth:** None required (CSV download) +- **Format:** CSV (semicolon or comma separated) +- **Rate limit:** Single download per run +- **Metrics:** ZEW Economic Expectations, ZEW Current Situation + +## Update Command + +```bash +bun ~/.claude/skills/Metrics/Tools/UpdateMetrics.ts --country de +``` + +## Output Files + +| File | Description | +|------|-------------| +| `DE-Common-Metrics.md` | Dashboard updated with current values and periods | +| `de-metrics-current.csv` | Latest value per metric: `timestamp,id,value,period,name,category` | +| `de-metrics-historical.csv` | Appended on each run: same columns, full time series | + +## Series ID Status + +⚠️ Destatis GENESIS series IDs in `de.config.ts` are **estimated** — approximately 30-50% may need correction after the first live run. Bundesbank SDMX keys are standard and expected to work without changes. + +After first live run, check the output for failed metrics and look up correct table codes at https://www-genesis.destatis.de/.