Add structural-context.csv (World Bank WGI governance + WDI economy & education); document in DATA_DICTIONARY
fc6c4e0 verified | # Data Dictionary — AFOS Germany 2025 Electoral Divergence | |
| Every file and column, with type, unit and provenance. **Party-level**: polls measure party vote share; the market prices the probability of winning the most seats. Values are never imputed or smoothed — missing values are left **blank**. | |
| --- | |
| ## `polls/germany-polls.csv` | |
| Party vote-share polling, **long format** — one row per party × poll. | |
| | Column | Type | Notes | | |
| |--------|------|-------| | |
| | `poll_date` | date | Fieldwork-end date (`YYYY-MM-DD`). | | |
| | `fieldwork` | string | Fieldwork window as published. | | |
| | `pollster` | string | Polling firm (Forsa, INSA, Infratest dimap, …). | | |
| | `sample` | integer | Sample size; blank when not declared (thousands separators normalized). | | |
| | `party` | string | Party (canonical): CDU/CSU, SPD, AfD, Grüne, Die Linke, FDP, BSW, Freie Wähler. | | |
| | `party_full` | string | Full party name. | | |
| | `percent` | number | Party vote-share intention, %. | | |
| ## `polls/germany-polls.json` | |
| Full structured polls (pollster, fieldwork, sample, per-party results). Deduplicated by (pollster, date), keeping the most complete row. | |
| --- | |
| ## `data/germany-market-odds-timeseries.csv` | |
| Polymarket **"wins the most seats"** probability per party, daily, from the "Germany Parliamentary Election Winner" market. | |
| | Column | Type | Notes | | |
| |--------|------|-------| | |
| | `date` | date | `YYYY-MM-DD`. | | |
| | `party` | string | Canonical party name. | | |
| | `polymarket_pct` | number | Implied probability of winning the most seats, %. | | |
| | `volume_usd` | number | Cumulative traded volume for that party's market, USD. | | |
| ## `data/germany-divergence-timeseries.csv` | |
| **Market × poll divergence** per party — each poll's party vote share joined to that party's market odds on the poll's date (nearest **on or before**). | |
| | Column | Type | Notes | | |
| |--------|------|-------| | |
| | `poll_date` | date | Poll date. | | |
| | `pollster` | string | Polling firm. | | |
| | `party` | string | Canonical party name. | | |
| | `poll_pct` | number | Party vote share, %. | | |
| | `polymarket_pct` | number | Market "wins most seats" probability on `polymarket_date`, %. | | |
| | `polymarket_date` | date | Market date used (nearest on-or-before `poll_date`). | | |
| | `divergence_pp` | number | `polymarket_pct − poll_pct`, percentage points. | | |
| > **Interpretation caveat:** a poll reports *vote share*; the market prices *probability of winning the most seats*. The two are different quantities — `divergence_pp` is the spread AFOS tracks, **not** an error metric. A party (e.g. AfD) can hold a large vote share while its probability of winning the plurality is near zero; the gap is the signal. | |
| ## `data/germany-poly-raw.json` | |
| Raw Polymarket payload (event + per-party price histories), via a US-resolving function, kept for provenance. | |
| --- | |
| **Sources:** [Wikipedia — Opinion polling for the 2025 German federal election](https://en.wikipedia.org/wiki/Opinion_polling_for_the_2025_German_federal_election) · Polymarket "Germany Parliamentary Election Winner". Maintained by [AFOS Analytics](https://afos-analytics.com). CC BY 4.0. | |
| ## `data/germany-structural-context.csv` | |
| Structural country context from the **World Bank**, complementary to the divergence data: it frames the country, it does **not** predict the electoral outcome. Long/tidy format, one row per indicator, latest available year per indicator. | |
| | Column | Type | Notes | | |
| |--------|------|-------| | |
| | `category` | string | `governance`, `economy`, or `education`. | | |
| | `indicator` | string | Machine code (e.g. `political_stability`, `gdp_usd`, `expected_years_schooling`). | | |
| | `label` | string | Human-readable indicator name (English). | | |
| | `value` | number | Governance on a 0–100 scale; economy in US$ / %; education in % of GDP or years. | | |
| | `unit` | string | `index_0_100`, `USD`, `percent`, or `years`. | | |
| | `year` | integer | Reference year of the value (latest available). | | |
| | `source` | string | World Bank WGI (governance, via Data360) or WDI (economy & education). | | |
| | `iso3` | string | ISO 3166 alpha-3 country code. | | |
| Both sources are open-licensed (CC BY 4.0) and keyless. Governance = Worldwide Governance Indicators; economy & education = World Development Indicators. | |