andrefelipe-afos
Add datapackage.json and croissant.json, the last two artefacts this bundle lacked
0394ac9
|
Raw
History Blame Contribute Delete
8.85 kB

# Datasheet — Brazil 2026 Electoral Divergence Dataset

Following Datasheets for Datasets (Gebru et al., 2021; arXiv:1803.09010). Part of the AFOS Analytics collection, cross-referencing prediction market × opinion polls × press coverage against the official result.

⚠️ This is the collection's only LIVE bundle. The other cases document elections that have already happened and are therefore static. This one tracks Brazil's 2026 presidential cycle as it unfolds, is updated daily, and will only become a validated case after the official result is proclaimed. Section 7 explains what that implies for versioning and integrity checking, and section 8 states, deliberately, what this bundle does not ship.

1. Motivation

Created by AFOS Analytics (independent, self-funded, no client work) to document, in an auditable form, the divergence between prediction markets, opinion polls and press narrative during a national election in progress. The premise is that when real money and declared intention disagree, the distance between them is itself information about electoral risk, and that averaging the two away destroys the signal. Intended for research on market-versus-poll calibration, for teaching, and for replication of the AFOS divergence method. To our knowledge this is the first Harvard Dataverse deposit to cross-reference prediction markets × registered polls × press coverage to measure explicit divergence in a Brazilian election.

2. Composition

Several observational units, each in its own table.

  • Polls. polls/tse-registry.csv and .json carry the official TSE registration sheet of every presidential poll filed for 2026. polls/national-poll-results-firstround.csv and polls/national-poll-results-secondround.csv hold published results in long format, one row per candidate × scenario × poll, each carrying its TSE registration number. polls/national-polls.json holds the full structured polls with methodology. polls/sample-demographics.csv holds the declared sample-design quotas.
  • Market. data/market-odds-timeseries.csv holds the daily Polymarket presidential odds per candidate, with volume. The series begins on 2026-04-17; the daily analysis snapshots begin earlier, on 2026-04-04.
  • Divergence. data/divergence-timeseries.csv and data/poll-divergence.csv pair each poll with the market, keeping both raw values side by side.
  • Daily snapshots. data/divergence-{date}.csv, polls/polls-data-{date}.json, snapshots/analysis-criteriosa/{date}.json and snapshots/analysis-cards/{date}.json preserve the state of each day rather than overwriting it.
  • Press. news/news-{date}.json carries links only: source, headline, URL and date. No article body is reproduced.

Columns are enumerated per file in DATA_DICTIONARY.md. Values are transcribed from public primary sources; nothing is imputed and nothing is smoothed. Where a number is missing it is left missing.

⚠️ This datasheet states no instance counts, on purpose. The bundle grows every day, so any count written into documentation is true on the day it is written and wrong soon after. Counts quoted elsewhere in this repository should be read as of their own date; the files themselves are the authority.

No personal or sensitive data. Polls enter as published aggregates. The demographic file describes the declared composition of each sample (quota design), never individual respondents.

3. Collection process

  • Polls: the official TSE Open Data registry (https://dadosabertos.tse.jus.br), plus the results as published by each named institute. Every row carries its TSE registration number, so any figure can be traced back to the filing.
  • Market: Polymarket, on-chain, read server-side through the AFOS proxy, in live USD markets.
  • Press: links from over 400 outlets, collected as references, never as content.
  • Collection is automated and runs daily; each run appends a dated snapshot rather than replacing the previous one.

⚠️ Registered is not published. A poll being filed with the TSE does not mean its numbers were released. Filings appear in the registry as soon as they are made; results enter this dataset only once the institute actually publishes them. The gap between the two is real and is visible in the data.

4. Preprocessing / cleaning

Poll and market series are emitted in tidy long format, one row per poll × candidate or per date × candidate. Nothing is smoothed except where a column is explicitly labelled as an average. Daily files are append-only: a correction produces a new dated file, it does not rewrite an old one.

5. Uses

Supports the AFOS live divergence analysis and, after the official result, the validated-case analysis. It should not be read as a forecast, as a causal claim, or as an official tally.

⚠️ Scale caveat, and it is the most important limitation here. A prediction market prices the probability of winning; a poll measures vote share. These are different quantities and are not directly comparable. Both divergence files keep the two raw values side by side and flag the naive difference explicitly as naive_winprob_minus_voteshare. It is a diagnostic of tension between instruments, not a measurement error.

⚠️ Market representativeness. The Brazilian presidential market is denominated in dollars and traded outside Brazil. Its participants are, by construction, not the Brazilian electorate. High liquidity does not fix this: it is a structural feature to be reasoned about, not a defect to be corrected.

⚠️ Demographic depth. Only sample-design demographics are included, meaning each poll's declared quota composition. Vote-by-demographic crosstabs are not, because they are not uniformly published.

6. Distribution

Hugging Face Hub (https://huggingface.co/datasets/AFOS-Analytics1/brazil-2026-electoral-divergence), mirrored on GitHub, and permanently archived on the Harvard Dataverse under the DOI 10.7910/DVN/2D0UK7. Dual licence: data under CC BY 4.0, code and scripts under Apache 2.0. Both require attribution to AFOS Analytics. No redistribution-restricted source is included: the poll registry is Brazilian public open data, the market data is public and on-chain, and the press layer carries links rather than text.

7. Maintenance and integrity

Maintained by AFOS Analytics (afos-analytics.com). Country ISO3: BRA. Election: national presidential, 2026, first round 2026-10-04.

Versioning is by dated file and by commit, not by manifest. Each daily run appends dated files and commits them, so the full history is preserved natively and any past day can be recovered exactly as it was published. CHANGELOG.md records the sequence.

This bundle deliberately ships no CHECKSUMS.txt, and the reason is stated here rather than left silent. The other bundles in this collection are static, so a manifest of SHA-256 hashes stays true indefinitely and is worth publishing. This one changes every day. A manifest written today would be wrong tomorrow, and a manifest that is usually wrong is worse than none: it makes intact files look altered and trains readers to ignore the check. Integrity here is provided by the immutable git history instead. Should the daily pipeline later generate the manifest as part of each run, it will be shipped and this paragraph revised.

The machine-readable descriptors cover the stable tables only. datapackage.json (Frictionless Table Schema, validated) and croissant.json describe the seven tables that keep their shape: the TSE registry, the first and second round result tables, the sample demographics, and the three divergence and market series. Each descriptor carries the SHA-256 of the table it describes, so those seven can be checked individually. The dated daily files under snapshots/, polls/ and news/ are deliberately not listed, for the same reason there is no hash manifest: a descriptor enumerating files that grow every day would be wrong by the next morning.

8. Known gaps, stated on purpose

  • No CHECKSUMS.txt, for the reason above.
  • The datapackage.json and croissant.json describe only the seven stable tables, not the dated daily files, for the same reason.
  • No validated-case status yet. This bundle becomes a validated case only after the electoral authority proclaims the result. Until then it documents divergence, it does not score accuracy.
  • Depth outside the poll layer. Brazil is the deepest bundle in the collection precisely because the TSE publishes an open registry with no equivalent elsewhere. That depth should not be assumed for the other countries.