AFOS-Analytics1 commited on
Commit
575e4c8
·
verified ·
1 Parent(s): 39ec9fa

Add structural-context.csv (World Bank WGI governance + WDI economy & education); document in DATA_DICTIONARY

Browse files
Files changed (2) hide show
  1. DATA_DICTIONARY.md +100 -83
  2. data/usa-structural-context.csv +12 -0
DATA_DICTIONARY.md CHANGED
@@ -1,83 +1,100 @@
1
- # Data Dictionary — AFOS USA 2024 Electoral Divergence
2
-
3
- > 🌐 **EN** — Data dictionary for the AFOS USA 2024 electoral-divergence dataset (polls × prediction markets × press). · **PT** — Dicionário de dados do dataset AFOS EUA 2024 (pesquisas × mercados de previsão × imprensa). · **ES** — Diccionario de datos del dataset AFOS EE. UU. 2024 (encuestas × mercados de predicción × prensa).
4
- > Column names and definitions below are kept in **English** (CSV/academic standard). · Os nomes e definições de coluna seguem em **inglês** (padrão dos CSVs). · Los nombres y definiciones se mantienen en **inglés**.
5
-
6
- Poll figures trace to a named pollster's published release, compiled from **FiveThirtyEight's** public 2024 president-poll database (Wayback snapshot of 4 Nov 2024). Market odds come from public Polymarket markets; press anchors are public articles archived in the Wayback Machine. Nothing is imputed or smoothed; missing values are left **blank**.
7
-
8
- ## `polls/usa-national-polls.csv` (long format)
9
-
10
- One row per candidate per poll. National general-election polls only (state = blank, stage = general, cycle = 2024), Harris & Trump. 3,691 rows.
11
-
12
- | Column | Type | Notes |
13
- |--------|------|-------|
14
- | `poll_id` | integer | FiveThirtyEight poll identifier. |
15
- | `pollster` | string | Polling firm (e.g. "Siena/NYT", "Marquette Law School", "Emerson"). |
16
- | `end_date` | date | End of fieldwork (`YYYY-MM-DD`). |
17
- | `sample_size` | integer | Sample size. |
18
- | `population` | string | Sampled population: `lv` (likely voters), `rv` (registered voters), `a` (all adults). |
19
- | `numeric_grade` | number | FiveThirtyEight pollster quality rating (0–3 scale), where published. |
20
- | `methodology` | string | Survey mode (e.g. "Online Panel", "Live Phone", "IVR/Online"). |
21
- | `candidate` | string | `Harris` or `Trump`. |
22
- | `pct` | number | National voting intention for that candidate, %. |
23
- | `source_url` | string | Primary source URL for the poll, as recorded by FiveThirtyEight. |
24
-
25
- ## `data/usa-winner-market-timeseries.csv` — PRIMARY AXIS (electoral college)
26
-
27
- Daily Polymarket win-probability from the **"Presidential Election Winner 2024"** market (who becomes president; total volume ≈ US$ 3.7 bn — the largest election market in history). 613 rows.
28
-
29
- | Column | Type | Notes |
30
- |--------|------|-------|
31
- | `date` | date | `YYYY-MM-DD` (daily fidelity). |
32
- | `candidate` | string | `Trump` or `Harris`. |
33
- | `win_prob_pct` | number | Implied probability of **winning the presidency**, % (0–100). |
34
-
35
- ## `data/usa-popularvote-market-timeseries.csv` — COUNTERPOINT (popular vote)
36
-
37
- Daily Polymarket win-probability from the **"Popular Vote Winner 2024"** market (who wins more popular votes; total volume ≈ US$ 628 M). This is the market that favored Harris and **erred**. 615 rows. Same columns as the winner series; `win_prob_pct` = implied probability of **winning the popular vote**.
38
-
39
- ## `data/usa-poll-aggregate-timeseries.csv`
40
-
41
- Trailing 7-day simple average of national poll vote share. 1,322 rows.
42
-
43
- | Column | Type | Notes |
44
- |--------|------|-------|
45
- | `date` | date | `YYYY-MM-DD`. |
46
- | `candidate` | string | `Trump` or `Harris`. |
47
- | `poll_vote_share_pct_7dma` | number | 7-day trailing average of national vote-share polls ending on or before `date`, %. |
48
-
49
- ## `data/usa-divergence-timeseries.csv`
50
-
51
- Market × poll divergence for the Harris–Trump head-to-head period (after Biden withdrew, 21 Jul 2024). 218 rows. **Axis = the winner (electoral-college) market.**
52
-
53
- | Column | Type | Notes |
54
- |--------|------|-------|
55
- | `date` | date | `YYYY-MM-DD` (market date). |
56
- | `candidate` | string | `Trump` or `Harris`. |
57
- | `market_win_prob_pct` | number | Winner-market implied probability of **winning the presidency**, %. |
58
- | `poll_vote_share_pct` | number | National poll **vote share** (7-day trailing average), %. |
59
- | `naive_gap_pp` | number | `market_win_prob_pct − poll_vote_share_pct`, in percentage points. **Different units** (probability vs share): reported raw, **not scale-reconciled**. The sign and trajectory are the signal, not the magnitude. |
60
-
61
- ## `press/usa-2024-press-timeline.csv`
62
-
63
- Curated, Wayback-archived press anchors cross-referencing the market×poll divergence. 7 rows.
64
-
65
- | Column | Type | Notes |
66
- |--------|------|-------|
67
- | `date` | date | Article publication date (`YYYY-MM-DD`). |
68
- | `outlet` | string | Publishing outlet (Fortune, Al Jazeera, NBC News, NPR, PBS NewsHour, CNN). |
69
- | `headline` | string | Exact article headline. |
70
- | `theme` | string | `market_poll_divergence` · `poll_near_tie` · `market_conviction_whale` · `result_validator` · `market_vindicated` · `poll_accuracy_postmortem`. |
71
- | `axis` | string | Which AFOS axis the anchor maps to (`market`, `poll`, `market×poll`, `result`). |
72
- | `tier` | string | `anchor` (core) or `secondary`. |
73
- | `primary_source` | string | Underlying primary source where the carrier differs (e.g. "Associated Press (race call)", "Wall Street Journal (original)"). |
74
- | `url` | string | Live article URL (verified HTTP 200). |
75
- | `wayback_url` | string | Internet Archive Wayback Machine snapshot (permanent citation). |
76
-
77
- ## `data/usa-case-summary.json`
78
-
79
- Machine-readable summary of the validated case: result (electoral college + popular vote), both markets with eve-of-vote probabilities and verdict, final poll average, and the honesty note (two markets disagreed; the validator is the real result).
80
-
81
- ## Raw provenance
82
-
83
- `data/usa-winner-poly-raw.json` and `data/usa-popularvote-poly-raw.json` — raw Polymarket payloads (event metadata + per-candidate daily price histories) for both markets, kept verbatim for provenance.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Data Dictionary — AFOS USA 2024 Electoral Divergence
2
+
3
+ > 🌐 **EN** — Data dictionary for the AFOS USA 2024 electoral-divergence dataset (polls × prediction markets × press). · **PT** — Dicionário de dados do dataset AFOS EUA 2024 (pesquisas × mercados de previsão × imprensa). · **ES** — Diccionario de datos del dataset AFOS EE. UU. 2024 (encuestas × mercados de predicción × prensa).
4
+ > Column names and definitions below are kept in **English** (CSV/academic standard). · Os nomes e definições de coluna seguem em **inglês** (padrão dos CSVs). · Los nombres y definiciones se mantienen en **inglés**.
5
+
6
+ Poll figures trace to a named pollster's published release, compiled from **FiveThirtyEight's** public 2024 president-poll database (Wayback snapshot of 4 Nov 2024). Market odds come from public Polymarket markets; press anchors are public articles archived in the Wayback Machine. Nothing is imputed or smoothed; missing values are left **blank**.
7
+
8
+ ## `polls/usa-national-polls.csv` (long format)
9
+
10
+ One row per candidate per poll. National general-election polls only (state = blank, stage = general, cycle = 2024), Harris & Trump. 3,691 rows.
11
+
12
+ | Column | Type | Notes |
13
+ |--------|------|-------|
14
+ | `poll_id` | integer | FiveThirtyEight poll identifier. |
15
+ | `pollster` | string | Polling firm (e.g. "Siena/NYT", "Marquette Law School", "Emerson"). |
16
+ | `end_date` | date | End of fieldwork (`YYYY-MM-DD`). |
17
+ | `sample_size` | integer | Sample size. |
18
+ | `population` | string | Sampled population: `lv` (likely voters), `rv` (registered voters), `a` (all adults). |
19
+ | `numeric_grade` | number | FiveThirtyEight pollster quality rating (0–3 scale), where published. |
20
+ | `methodology` | string | Survey mode (e.g. "Online Panel", "Live Phone", "IVR/Online"). |
21
+ | `candidate` | string | `Harris` or `Trump`. |
22
+ | `pct` | number | National voting intention for that candidate, %. |
23
+ | `source_url` | string | Primary source URL for the poll, as recorded by FiveThirtyEight. |
24
+
25
+ ## `data/usa-winner-market-timeseries.csv` — PRIMARY AXIS (electoral college)
26
+
27
+ Daily Polymarket win-probability from the **"Presidential Election Winner 2024"** market (who becomes president; total volume ≈ US$ 3.7 bn — the largest election market in history). 613 rows.
28
+
29
+ | Column | Type | Notes |
30
+ |--------|------|-------|
31
+ | `date` | date | `YYYY-MM-DD` (daily fidelity). |
32
+ | `candidate` | string | `Trump` or `Harris`. |
33
+ | `win_prob_pct` | number | Implied probability of **winning the presidency**, % (0–100). |
34
+
35
+ ## `data/usa-popularvote-market-timeseries.csv` — COUNTERPOINT (popular vote)
36
+
37
+ Daily Polymarket win-probability from the **"Popular Vote Winner 2024"** market (who wins more popular votes; total volume ≈ US$ 628 M). This is the market that favored Harris and **erred**. 615 rows. Same columns as the winner series; `win_prob_pct` = implied probability of **winning the popular vote**.
38
+
39
+ ## `data/usa-poll-aggregate-timeseries.csv`
40
+
41
+ Trailing 7-day simple average of national poll vote share. 1,322 rows.
42
+
43
+ | Column | Type | Notes |
44
+ |--------|------|-------|
45
+ | `date` | date | `YYYY-MM-DD`. |
46
+ | `candidate` | string | `Trump` or `Harris`. |
47
+ | `poll_vote_share_pct_7dma` | number | 7-day trailing average of national vote-share polls ending on or before `date`, %. |
48
+
49
+ ## `data/usa-divergence-timeseries.csv`
50
+
51
+ Market × poll divergence for the Harris–Trump head-to-head period (after Biden withdrew, 21 Jul 2024). 218 rows. **Axis = the winner (electoral-college) market.**
52
+
53
+ | Column | Type | Notes |
54
+ |--------|------|-------|
55
+ | `date` | date | `YYYY-MM-DD` (market date). |
56
+ | `candidate` | string | `Trump` or `Harris`. |
57
+ | `market_win_prob_pct` | number | Winner-market implied probability of **winning the presidency**, %. |
58
+ | `poll_vote_share_pct` | number | National poll **vote share** (7-day trailing average), %. |
59
+ | `naive_gap_pp` | number | `market_win_prob_pct − poll_vote_share_pct`, in percentage points. **Different units** (probability vs share): reported raw, **not scale-reconciled**. The sign and trajectory are the signal, not the magnitude. |
60
+
61
+ ## `press/usa-2024-press-timeline.csv`
62
+
63
+ Curated, Wayback-archived press anchors cross-referencing the market×poll divergence. 7 rows.
64
+
65
+ | Column | Type | Notes |
66
+ |--------|------|-------|
67
+ | `date` | date | Article publication date (`YYYY-MM-DD`). |
68
+ | `outlet` | string | Publishing outlet (Fortune, Al Jazeera, NBC News, NPR, PBS NewsHour, CNN). |
69
+ | `headline` | string | Exact article headline. |
70
+ | `theme` | string | `market_poll_divergence` · `poll_near_tie` · `market_conviction_whale` · `result_validator` · `market_vindicated` · `poll_accuracy_postmortem`. |
71
+ | `axis` | string | Which AFOS axis the anchor maps to (`market`, `poll`, `market×poll`, `result`). |
72
+ | `tier` | string | `anchor` (core) or `secondary`. |
73
+ | `primary_source` | string | Underlying primary source where the carrier differs (e.g. "Associated Press (race call)", "Wall Street Journal (original)"). |
74
+ | `url` | string | Live article URL (verified HTTP 200). |
75
+ | `wayback_url` | string | Internet Archive Wayback Machine snapshot (permanent citation). |
76
+
77
+ ## `data/usa-case-summary.json`
78
+
79
+ Machine-readable summary of the validated case: result (electoral college + popular vote), both markets with eve-of-vote probabilities and verdict, final poll average, and the honesty note (two markets disagreed; the validator is the real result).
80
+
81
+ ## Raw provenance
82
+
83
+ `data/usa-winner-poly-raw.json` and `data/usa-popularvote-poly-raw.json` — raw Polymarket payloads (event metadata + per-candidate daily price histories) for both markets, kept verbatim for provenance.
84
+
85
+ ## `data/usa-structural-context.csv`
86
+
87
+ 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.
88
+
89
+ | Column | Type | Notes |
90
+ |--------|------|-------|
91
+ | `category` | string | `governance`, `economy`, or `education`. |
92
+ | `indicator` | string | Machine code (e.g. `political_stability`, `gdp_usd`, `expected_years_schooling`). |
93
+ | `label` | string | Human-readable indicator name (English). |
94
+ | `value` | number | Governance on a 0-100 scale; economy in US$ / %; education in % of GDP or years. |
95
+ | `unit` | string | `index_0_100`, `USD`, `percent`, or `years`. |
96
+ | `year` | integer | Reference year of the value (latest available). |
97
+ | `source` | string | World Bank WGI (governance, via Data360) or WDI (economy & education). |
98
+ | `iso3` | string | ISO 3166 alpha-3 country code. |
99
+
100
+ Both sources are open-licensed (CC BY 4.0) and keyless. Governance = Worldwide Governance Indicators; economy & education = World Development Indicators.
data/usa-structural-context.csv ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ category,indicator,label,value,unit,year,source,iso3
2
+ governance,political_stability,"Political stability",64.3,index_0_100,2024,"World Bank Worldwide Governance Indicators (WGI)",USA
3
+ governance,voice_accountability,"Voice and accountability",72.4,index_0_100,2024,"World Bank Worldwide Governance Indicators (WGI)",USA
4
+ governance,rule_of_law,"Rule of law",73.5,index_0_100,2024,"World Bank Worldwide Governance Indicators (WGI)",USA
5
+ governance,government_effectiveness,"Government effectiveness",77.8,index_0_100,2024,"World Bank Worldwide Governance Indicators (WGI)",USA
6
+ governance,regulatory_quality,"Regulatory quality",76.2,index_0_100,2024,"World Bank Worldwide Governance Indicators (WGI)",USA
7
+ governance,control_of_corruption,"Control of corruption",69.9,index_0_100,2024,"World Bank Worldwide Governance Indicators (WGI)",USA
8
+ macro,gdp_usd,"GDP (current US$)",28750956130731,USD,2024,"World Bank World Development Indicators (WDI)",USA
9
+ macro,gdp_per_capita_usd,"GDP per capita (current US$)",84534.04,USD,2024,"World Bank World Development Indicators (WDI)",USA
10
+ macro,inflation_pct,"Inflation, consumer prices (annual %)",2.95,percent,2024,"World Bank World Development Indicators (WDI)",USA
11
+ education,gov_expenditure_pct_gdp,"Government expenditure on education (% of GDP)",5.42,percent,2021,"World Bank World Development Indicators (WDI)",USA
12
+ education,expected_years_schooling,"Expected years of schooling",16.28,years,2018,"World Bank World Development Indicators (WDI)",USA