File size: 19,615 Bytes
1ccea26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
584d0be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2f97224
 
 
 
584d0be
 
 
 
1ccea26
 
43ba305
 
1ccea26
 
875b596
 
2b22998
 
 
 
 
 
6b19600
1ccea26
6b19600
1ccea26
2b22998
1ccea26
2b22998
 
6b19600
 
 
2b22998
875b596
 
2b22998
 
 
1ccea26
2b22998
1ccea26
6b19600
1ccea26
6b19600
1ccea26
2b22998
1ccea26
2b22998
1ccea26
6b19600
 
 
1ccea26
875b596
 
2b22998
1ccea26
2b22998
 
 
 
6b19600
2b22998
6b19600
2b22998
 
1ccea26
2b22998
1ccea26
6b19600
 
 
1ccea26
875b596
 
2b22998
1ccea26
2b22998
 
 
 
3b6347e
 
 
 
07cb654
 
fbbea6d
 
 
 
 
07cb654
3b6347e
fcdd6bf
 
 
 
 
 
 
 
 
 
800bafa
 
 
 
 
 
bf8c0c1
 
 
 
 
 
 
 
 
 
 
 
fcdd6bf
8014ba2
 
 
 
 
10e7eb5
8014ba2
10e7eb5
8014ba2
 
 
3b6347e
 
 
 
07cb654
3b6347e
866de75
ce1be5d
 
3b6347e
 
 
 
 
 
 
 
 
 
 
 
6b19600
3b6347e
866de75
 
6b19600
 
 
88986d3
1ccea26
6b19600
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
---
license:
- cc-by-4.0
- apache-2.0
language:
- pt
- en
- es
pretty_name: "AFOS — Brazil 2026 Electoral Divergence"
tags:
- elections
- brazil
- prediction-markets
- polls
- political-risk
- divergence
- civic-tech
- open-data
# As tabelas navegaveis, declaradas uma a uma. Sem esta lista o visualizador do
# HF tenta empilhar TODOS os arquivos num split unico, esbarra no datapackage.json
# (que e metadado, nao dado) e derruba a pagina inteira: medido em 22/Ago/2026,
# os cinco indicadores em false e 0 de 2,5 MB servidos. A primeira entrada e a que
# a pagina ABRE, e por isso e a serie de divergencia, que e a identidade do bundle.
configs:
  - config_name: divergence_daily
    data_files:
      - split: train
        path: data/divergence-daily-timeseries.csv
  - config_name: divergence_by_poll
    data_files:
      - split: train
        path: data/divergence-timeseries.csv
  - config_name: poll_divergence
    data_files:
      - split: train
        path: data/poll-divergence.csv
  - config_name: market_odds
    data_files:
      - split: train
        path: data/market-odds-timeseries.csv
  - config_name: polls_first_round
    data_files:
      - split: train
        path: polls/national-poll-results-firstround.csv
  - config_name: polls_second_round
    data_files:
      - split: train
        path: polls/national-poll-results-secondround.csv
  - config_name: sample_demographics
    data_files:
      - split: train
        path: polls/sample-demographics.csv
  - config_name: tse_registry
    data_files:
      - split: train
        path: polls/tse-registry.csv
---

![AFOS — Brazil 2026 Electoral Divergence](banner.png)

# AFOS — Brazil 2026 Electoral Divergence Dataset

[![Harvard Dataverse DOI](https://img.shields.io/badge/Harvard%20Dataverse-10.7910%2FDVN%2F2D0UK7-a51c30)](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/2D0UK7)

🌐 **[English](#english) · [Português](#português) · [Español](#español)**

---

## English

Open, auditable dataset that cross-references **prediction markets (Polymarket) × polling institutes (TSE-registered) × press coverage** for Brazil's 2026 presidential election (first round 2026-10-04, runoff 2026-10-25), with **explicit divergence** between sources instead of smoothed averages.

Maintained by **[AFOS Analytics](https://afos-analytics.com)** — open-source civic infrastructure for electoral political-risk intelligence. **Closed on 2026-11-01:** the daily mirror that fed this dataset was switched off after the election, and no files are added after that date. Files are **dated and append-only**: past dates were never overwritten, and every update was a git commit, so the full history is preserved natively.

**🔒 No personal data (privacy / LGPD):** contains **only public electoral data** (market odds, registered polls, news links). **No subscriber data, no emails, no leads, no personal information of any kind.** The export pipeline is database-free by construction and never accesses any user table. Brazil's LGPD and equivalent principles are respected in full.

**License (dual):** **Data** → CC BY 4.0 (`LICENSE-CC-BY-4.0`); **code/scripts** → Apache 2.0 (`LICENSE-APACHE-2.0`). Both **require attribution** to AFOS Analytics.

**Polymarket data:** prices, volumes and trades were read by AFOS from Polymarket's public API and the public Polygon blockchain. AFOS is not affiliated with Polymarket. Polymarket's Terms of Use restrict the use of its data by capital-market firms and market-data distributors without a written agreement with Polymarket; users in those categories should check those terms (`DATASHEET.md`, section 6).

**Cite:** *AFOS Analytics (2026). Brazil 2026 Electoral Divergence Dataset, version 2.0.0. Harvard Dataverse. https://doi.org/10.7910/DVN/2D0UK7. CC BY 4.0.*

**Permanent archive:** also deposited at the **[Harvard Dataverse](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/2D0UK7)** — DOI [10.7910/DVN/2D0UK7](https://doi.org/10.7910/DVN/2D0UK7).

**Disclaimer:** observational research. **Not investment advice, not voting guidance.** AFOS observes the markets — it does not trade them.

---

## Português

Dataset aberto e auditável que cruza **mercados de previsão (Polymarket) × institutos de pesquisa (registrados no TSE) × cobertura de imprensa** para a eleição presidencial brasileira de 2026 (1º turno em 04/10/2026, 2º turno em 25/10/2026), com **divergência explícita** entre as fontes em vez de médias suavizadas.

Mantido pela **[AFOS Analytics](https://afos-analytics.com)** — infraestrutura cívica open-source de inteligência de risco político eleitoral. **Fechado em 01/11/2026:** o espelho diário que alimentava este dataset foi desligado depois da eleição, e nenhum arquivo entra depois dessa data. Os arquivos são **datados e append-only**: datas passadas nunca foram sobrescritas, e cada atualização foi um commit git, então o histórico completo fica preservado.

**🔒 Sem dados pessoais (privacidade / LGPD):** contém **apenas dados eleitorais públicos** (odds de mercado, pesquisas registradas, links de notícia). **Nenhum dado de assinante, nenhum email, nenhum lead, nenhuma informação pessoal.** O pipeline de export é database-free por construção e nunca acessa qualquer tabela de usuário. A LGPD e princípios equivalentes são respeitados integralmente.

**Licença (dual):** **Dados** → CC BY 4.0 (`LICENSE-CC-BY-4.0`); **código/scripts** → Apache 2.0 (`LICENSE-APACHE-2.0`). Ambas **exigem atribuição** à AFOS Analytics.

**Dados do Polymarket:** preços, volumes e negociações foram lidos pelo AFOS na API pública do Polymarket e na blockchain pública Polygon. O AFOS não é afiliado ao Polymarket. Os Termos de Uso do Polymarket restringem o uso dos dados dele por empresas do mercado de capitais e distribuidores de dados de mercado sem acordo por escrito com o Polymarket; quem estiver nesses grupos deve conferir esses termos (`DATASHEET.md`, seção 6).

**Citação:** *AFOS Analytics (2026). Brazil 2026 Electoral Divergence Dataset, versão 2.0.0. Harvard Dataverse. https://doi.org/10.7910/DVN/2D0UK7. CC BY 4.0.*

**Arquivo permanente:** também depositado no **[Harvard Dataverse](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/2D0UK7)** — DOI [10.7910/DVN/2D0UK7](https://doi.org/10.7910/DVN/2D0UK7).

**Aviso:** pesquisa observacional. **Não é recomendação de investimento nem orientação de voto.** A AFOS observa os mercados — não opera neles.

---

## Español

Dataset abierto y auditable que cruza **mercados de predicción (Polymarket) × encuestadoras (registradas en el TSE) × cobertura de prensa** para la elección presidencial brasileña de 2026 (primera vuelta el 04/10/2026, segunda vuelta el 25/10/2026), con **divergencia explícita** entre las fuentes en lugar de promedios suavizados.

Mantenido por **[AFOS Analytics](https://afos-analytics.com)** — infraestructura cívica open-source de inteligencia de riesgo político electoral. **Cerrado el 01/11/2026:** el espejo diario que alimentaba este dataset se apagó después de la elección, y no entra ningún archivo después de esa fecha. Los archivos son **fechados y append-only**: las fechas pasadas nunca se sobrescribieron, y cada actualización fue un commit git, así que el historial completo se preserva.

**🔒 Sin datos personales (privacidad / LGPD):** contiene **solo datos electorales públicos** (odds de mercado, encuestas registradas, enlaces de noticias). **Ningún dato de suscriptor, ningún email, ningún lead, ninguna información personal.** El pipeline de exportación es database-free por construcción y nunca accede a ninguna tabla de usuarios. La LGPD y principios equivalentes se respetan íntegramente.

**Licencia (dual):** **Datos** → CC BY 4.0 (`LICENSE-CC-BY-4.0`); **código/scripts** → Apache 2.0 (`LICENSE-APACHE-2.0`). Ambas **requieren atribución** a AFOS Analytics.

**Datos de Polymarket:** precios, volúmenes y operaciones fueron leídos por AFOS en la API pública de Polymarket y en la blockchain pública Polygon. AFOS no está afiliado a Polymarket. Los Términos de Uso de Polymarket restringen el uso de sus datos por empresas del mercado de capitales y distribuidores de datos de mercado sin acuerdo por escrito con Polymarket; quien esté en esos grupos debe revisar esos términos (`DATASHEET.md`, sección 6).

**Citar:** *AFOS Analytics (2026). Brazil 2026 Electoral Divergence Dataset, versión 2.0.0. Harvard Dataverse. https://doi.org/10.7910/DVN/2D0UK7. CC BY 4.0.*

**Archivo permanente:** también depositado en el **[Harvard Dataverse](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/2D0UK7)** — DOI [10.7910/DVN/2D0UK7](https://doi.org/10.7910/DVN/2D0UK7).

**Aviso:** investigación observacional. **No es asesoría de inversión ni orientación de voto.** AFOS observa los mercados — no opera en ellos.

---

## 📁 Structure · Estrutura · Estructura

Full column-level definitions for every file are in **[`DATA_DICTIONARY.md`](DATA_DICTIONARY.md)**. Citation metadata in **[`CITATION.cff`](CITATION.cff)**; version history in **[`CHANGELOG.md`](CHANGELOG.md)**.

### 🗳️ Electoral polls (priority) · Pesquisas eleitorais · Encuestas

| Path | Rows | Content |
|------|------|---------|
| `polls/tse-registry.csv` · `.json` | 1,404 | **Official TSE poll registry — full public fields**, built directly from the [TSE Open Data](https://dadosabertos.tse.jus.br) file. Every presidential poll filed for 2026 with its complete registration sheet: institute, CNPJ, sample, field dates, declared cost, **named responsible statistician + CONRE**, and the **full (un-truncated) methodology and sampling/weighting design** — including the demographic/geographic quota design (sex, age, education, income, region) with the declared quota percentages. *Registration-design fields only — no per-candidate results, and the complete questionnaire is a PesqEle attachment, not in the open-data file.* (`Lei 9.504/97 art. 33`) |
| `polls/national-poll-results-firstround.csv` | 814 | **Published first-round results**, long format: one row per candidate × scenario × poll. Carries the TSE registration number, institute, sample, margin, field dates. |
| `polls/national-poll-results-secondround.csv` | 346 | Published head-to-head **runoff** matchups (`candidate1 vs candidate2`, percentages). |
| `polls/national-polls.json` | 177 | Full structured national polls **with results** (first round + runoff + methodology), reconstructed from the platform history. Each poll carries a **`tse_registration`** block (full methodology, sampling/weighting design, statistician, CONRE, CNPJ, cost) and, since 2026-06-13, **fieldwork-midpoint dating** (`field_midpoint`, `days_to_first_round`/`runoff`) plus **`tse_registration.sample_design`** (parsed sample composition/weighting — layer A). |
| `polls/sample-demographics.csv` | 874 | **Sample-design demographics (layer A)**, long format: each poll's declared sex/age/education/income quota composition parsed from the TSE sampling plan, with explicit per-poll coverage (`full_percentages` 34/83 · `mentioned_no_pct` 49/83). This is sample composition/weighting — **not** vote-by-demographic crosstabs (layer B), which are not part of TSE open data. |
| `polls/polls-data-{date}.json` | — | Daily snapshot of the national polls referenced on that date. |

### 🗳️ Official result · Resultado oficial · Resultado oficial

| Path | Rows | Content |
|------|------|---------|
| `results/first-round-2026-official.json` | 1 | **Final TSE tally of the first round** (100% of sections, generated 2026-10-05 12:51): electorate, turnout, abstention, valid, blank and null votes, all twelve candidates with votes and party, and the **voting machines** of the day (in use, backup, replaced, sections voting on paper), each with its TSE source. |
| `results/first-round-2026-candidates.csv` | 12 | One row per candidate, with votes, percentage of valid votes, party, coalition and TSE status. |
| `results/first-round-2026-summary.csv` | 14 | One row per figure, with the denominator of each percentage declared. |
| `results/first-round-2026-retrospective.csv` | 18 | **What each instrument said on the eve**: the nine national polls of 2026-10-03 and four Polymarket books, item by item, against the outcome. |
| `results/first-round-2026-retrospective-summary.csv` | 5 | The same comparison one row per instrument, as the panel card shows it: matched or not, and for the polls whether the majority of houses had the winner ahead and whether their range contained the count. |

| `results/second-round-2026-official.json` | 1 | **Final TSE tally of the second round** (100% of sections, generated 2026-10-25 23:27): Lula 51.79%, Flávio Bolsonaro 48.21% of valid votes; electorate, turnout, abstention, blank and null votes, and the **voting machines** of the day (499,248 in use, 48,815 backup, 1,551 replaced, no section voting on paper), each with its TSE source. |
| `results/second-round-2026-candidates.csv` | 2 | The two runoff candidates, with votes, percentage of valid votes, party, coalition and TSE status. |
| `results/second-round-2026-summary.csv` | 13 | One row per figure, with the denominator of each percentage declared. |
| `results/second-round-2026-retrospective.csv` | 15 | **What each instrument said on the eve**: the ten national polls of 2026-10-24, the 55 national polls conducted after the first round by leader, and the Polymarket winner contract, item by item, against the outcome. |
| `results/second-round-2026-retrospective-summary.csv` | 3 | The same comparison one row per instrument, as the panel card shows it. |

Both rounds use the same format. In the first-round files the winner contract, open until the runoff, is now resolved: Lula. Details in [`results/README.md`](results/README.md).

### 🌙 Election nights

| Path | Rows | Content |
|------|------|---------|
| `election-night/first-round-2026-live.csv` · `.jsonl` | 4 | **First-round night** (2026-10-04): each AFOS edition during the count, with the TSE tally it used and the confirmed Polymarket reading it published. |
| `election-night/second-round-2026-live.csv` · `.jsonl` | 87 | **Second-round night** (2026-10-25), every three minutes from 19:35 to 23:56 Brasília: TSE tally and winner-contract price and volume at the same minute (single reading). |
| `election-night/second-round-2026-trades.csv` | 24,784 | Trades in the two winner contracts during the count, **wallets anonymized** (`A1`, `A2`...), with coverage declared per row. |
| `election-night/second-round-2026-holders.csv` | 16,640 | Top 20 holders of each side of each winner contract, about once a minute, anonymized. |

Details in [`election-night/README.md`](election-night/README.md).

### 📕 Final report · Relatório final · Informe final

| Path | Content |
|------|---------|
| `final-report/relatorio-final-brasil-2026-v1.1-31out.pdf` | **Relatório de fechamento Brasil 2026**, version 1.1 (cutoff 2026-10-31), in Portuguese: the 186 days of market, polls and press compared with the official result of both rounds (Part I), the complement on the vote extension, the contestation and the reactions in Brazil and abroad (Part II), and an annex with the official results. |
| `final-report/brazil-2026-closing-report-v1.1-31oct.pdf` · `informe-de-cierre-brasil-2026-v1.1-31oct.pdf` | The same report in English and in Spanish. |
| `final-report/relatorio-final-brasil-2026-v1.0-26out.pdf` | Version 1.0 of 2026-10-26, frozen. |
| `final-report/SHA256SUMS.txt` | SHA-256 of the four PDFs. |

Details in [`final-report/README.md`](final-report/README.md).

### 📈 Market & divergence time-series

| Path | Content |
|------|---------|
| `data/market-odds-timeseries.csv` | **Polymarket presidential odds per candidate, daily** (`date, candidate, party, polymarket_pct, volume_usd_m`) — full history from 2026-04-04. |
| `data/divergence-timeseries.csv` | **Market × poll divergence** per candidate (`poll_date, institute, register_tse, candidate, poll_pct, polymarket_pct, polymarket_date, divergence_pp`) — each national poll joined to the market odds on its date. The dataset's namesake signal. |
| `data/poll-divergence.csv` | **Poll-level market × poll pairing** anchored on each poll's **fieldwork midpoint**; `naive_gap_pp` is explicitly flagged `naive_winprob_minus_voteshare` — the market prices *P(win)* while the poll reports *vote share*, so the gap is **not scale-reconciled** (reconciling the scales is a modeling choice left to the researcher). |
| `data/divergence-{date}.csv` | Per-day market × poll divergence snapshot, **first round** (ends 2026-10-04). |
| `data/divergence-second-round-{date}.csv` | Per-day snapshot for the **second round** (from 2026-10-05): the two runoff candidates only, with the poll side taken from the Lula × Flávio Bolsonaro head-to-head. See `DATA_DICTIONARY.md`. |

### 📰 Daily analysis & news

| Path | Content |
|------|---------|
| `snapshots/analysis-criteriosa/{date}.json` | Daily analysis: market × poll × press, per candidate (incl. `quadroComparativo`). |
| `snapshots/analysis-cards/{date}.json` | Thematic cards (sentiment, institutional, macro). |
| `news/news-{date}.json` | Public news **links** (source, title, URL, date) — no article bodies. |

## 🎓 For researchers

- **Start with** `DATA_DICTIONARY.md` (every column, type, unit, provenance) and `polls/` (the registered-poll universe + published results).
- **Reproducibility:** every value traces to a public primary source — the TSE registry, a named pollster's release, or a Polymarket contract. Nothing is imputed or smoothed; where a number is missing it is left blank, not filled.
- **Editorial stance:** AFOS reports *divergence* between sources rather than a single blended average — the spread is treated as signal, not noise.
- **Demographics:** *sample-design* demographics — the declared composition/weighting of each poll's sample (layer A) — are included (`polls/sample-demographics.csv`). *Vote-by-demographic crosstabs* (layer B — e.g. vote share by sex/age/income) are **not** part of Brazil's TSE open data; institutes publish those separately, so they are intentionally absent here rather than partially scraped.
- **Scale caveat (market vs poll):** Polymarket prices *probability of winning*; polls report *vote share*. The two divergence files keep both raw values side by side and flag the naive gap accordingly — they are not a like-for-like error metric.
- **Updates:** closed on 2026-11-01. The files are dated and append-only, and the full history is preserved in the commits (see `CHANGELOG.md`).
- **Integrity:** `CHECKSUMS.txt` lists the SHA-256 of every file; `datapackage.json` (Frictionless, validated) and `croissant.json` describe every final table and the report PDFs, each with its SHA-256.
- **Limitations:** stated in one place, `DATASHEET.md`, section 8.
- **Known errors:** see **`ERRATA.md`**. When a defect is found in a past date, the file is **not** rewritten — the correction is published in the errata instead, so the record stays as distributed and the defect stays discoverable. *Erros conhecidos em `ERRATA.md`. · Errores conocidos en `ERRATA.md`.*

**Sources / Fontes / Fuentes:** Polymarket (USD markets) · TSE-registered institutes · 400+ press outlets. Method & source code (Apache 2.0): [github.com/AFOS-Analytics](https://github.com/AFOS-Analytics).