The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
name: string
title: string
description: string
version: string
created: timestamp[s]
homepage: string
keywords: list<item: string>
child 0, item: string
licenses: list<item: struct<name: string, title: string, path: string>>
child 0, item: struct<name: string, title: string, path: string>
child 0, name: string
child 1, title: string
child 2, path: string
contributors: list<item: struct<title: string, role: string, path: string>>
child 0, item: struct<title: string, role: string, path: string>
child 0, title: string
child 1, role: string
child 2, path: string
sources: list<item: struct<title: string>>
child 0, item: struct<title: string>
child 0, title: string
resources: list<item: struct<name: string, type: string, path: string, scheme: string, format: string, mediatyp (... 150 chars omitted)
child 0, item: struct<name: string, type: string, path: string, scheme: string, format: string, mediatype: string, (... 138 chars omitted)
child 0, name: string
child 1, type: string
child 2, path: string
child 3, scheme: string
child 4, format: string
child 5, mediatype: string
child 6, encoding: string
child 7, schema: struct<fields: list<item: struct<name: string, type: string>>, missingValues: list<item: string>>
child 0, fields: list<item: struct<name: string, type: string>>
child 0, item: struct<name: string, type: string>
child 0, name: str
...
rs omitted)
child 0, item: struct<@type: string, @id: string, name: string, field: list<item: struct<@type: string, @id: string (... 117 chars omitted)
child 0, @type: string
child 1, @id: string
child 2, name: string
child 3, field: list<item: struct<@type: string, @id: string, name: string, dataType: string, source: struct<fileObj (... 60 chars omitted)
child 0, item: struct<@type: string, @id: string, name: string, dataType: string, source: struct<fileObject: struct (... 48 chars omitted)
child 0, @type: string
child 1, @id: string
child 2, name: string
child 3, dataType: string
child 4, source: struct<fileObject: struct<@id: string>, extract: struct<column: string>>
child 0, fileObject: struct<@id: string>
child 0, @id: string
child 1, extract: struct<column: string>
child 0, column: string
@type: string
@context: struct<@vocab: string, cr: string, sc: string, dataType: struct<@id: string, @type: string>, field: (... 95 chars omitted)
child 0, @vocab: string
child 1, cr: string
child 2, sc: string
child 3, dataType: struct<@id: string, @type: string>
child 0, @id: string
child 1, @type: string
child 4, field: string
child 5, fileObject: string
child 6, recordSet: string
child 7, source: string
child 8, extract: string
child 9, column: string
license: string
to
{'@context': {'@vocab': Value('string'), 'cr': Value('string'), 'sc': Value('string'), 'dataType': {'@id': Value('string'), '@type': Value('string')}, 'field': Value('string'), 'fileObject': Value('string'), 'recordSet': Value('string'), 'source': Value('string'), 'extract': Value('string'), 'column': Value('string')}, '@type': Value('string'), 'cr:conformsTo': Value('string'), 'name': Value('string'), 'description': Value('string'), 'license': Value('string'), 'url': Value('string'), 'version': Value('string'), 'citation': Value('string'), 'keywords': List(Value('string')), 'distribution': List({'@type': Value('string'), '@id': Value('string'), 'name': Value('string'), 'contentUrl': Value('string'), 'encodingFormat': Value('string'), 'sha256': Value('string')}), 'recordSet': List({'@type': Value('string'), '@id': Value('string'), 'name': Value('string'), 'field': List({'@type': Value('string'), '@id': Value('string'), 'name': Value('string'), 'dataType': Value('string'), 'source': {'fileObject': {'@id': Value('string')}, 'extract': {'column': Value('string')}}})})}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
name: string
title: string
description: string
version: string
created: timestamp[s]
homepage: string
keywords: list<item: string>
child 0, item: string
licenses: list<item: struct<name: string, title: string, path: string>>
child 0, item: struct<name: string, title: string, path: string>
child 0, name: string
child 1, title: string
child 2, path: string
contributors: list<item: struct<title: string, role: string, path: string>>
child 0, item: struct<title: string, role: string, path: string>
child 0, title: string
child 1, role: string
child 2, path: string
sources: list<item: struct<title: string>>
child 0, item: struct<title: string>
child 0, title: string
resources: list<item: struct<name: string, type: string, path: string, scheme: string, format: string, mediatyp (... 150 chars omitted)
child 0, item: struct<name: string, type: string, path: string, scheme: string, format: string, mediatype: string, (... 138 chars omitted)
child 0, name: string
child 1, type: string
child 2, path: string
child 3, scheme: string
child 4, format: string
child 5, mediatype: string
child 6, encoding: string
child 7, schema: struct<fields: list<item: struct<name: string, type: string>>, missingValues: list<item: string>>
child 0, fields: list<item: struct<name: string, type: string>>
child 0, item: struct<name: string, type: string>
child 0, name: str
...
rs omitted)
child 0, item: struct<@type: string, @id: string, name: string, field: list<item: struct<@type: string, @id: string (... 117 chars omitted)
child 0, @type: string
child 1, @id: string
child 2, name: string
child 3, field: list<item: struct<@type: string, @id: string, name: string, dataType: string, source: struct<fileObj (... 60 chars omitted)
child 0, item: struct<@type: string, @id: string, name: string, dataType: string, source: struct<fileObject: struct (... 48 chars omitted)
child 0, @type: string
child 1, @id: string
child 2, name: string
child 3, dataType: string
child 4, source: struct<fileObject: struct<@id: string>, extract: struct<column: string>>
child 0, fileObject: struct<@id: string>
child 0, @id: string
child 1, extract: struct<column: string>
child 0, column: string
@type: string
@context: struct<@vocab: string, cr: string, sc: string, dataType: struct<@id: string, @type: string>, field: (... 95 chars omitted)
child 0, @vocab: string
child 1, cr: string
child 2, sc: string
child 3, dataType: struct<@id: string, @type: string>
child 0, @id: string
child 1, @type: string
child 4, field: string
child 5, fileObject: string
child 6, recordSet: string
child 7, source: string
child 8, extract: string
child 9, column: string
license: string
to
{'@context': {'@vocab': Value('string'), 'cr': Value('string'), 'sc': Value('string'), 'dataType': {'@id': Value('string'), '@type': Value('string')}, 'field': Value('string'), 'fileObject': Value('string'), 'recordSet': Value('string'), 'source': Value('string'), 'extract': Value('string'), 'column': Value('string')}, '@type': Value('string'), 'cr:conformsTo': Value('string'), 'name': Value('string'), 'description': Value('string'), 'license': Value('string'), 'url': Value('string'), 'version': Value('string'), 'citation': Value('string'), 'keywords': List(Value('string')), 'distribution': List({'@type': Value('string'), '@id': Value('string'), 'name': Value('string'), 'contentUrl': Value('string'), 'encodingFormat': Value('string'), 'sha256': Value('string')}), 'recordSet': List({'@type': Value('string'), '@id': Value('string'), 'name': Value('string'), 'field': List({'@type': Value('string'), '@id': Value('string'), 'name': Value('string'), 'dataType': Value('string'), 'source': {'fileObject': {'@id': Value('string')}, 'extract': {'column': Value('string')}}})})}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
AFOS · Mexico 2024 Electoral Divergence Dataset
🌐 English · Português · Español
Open dataset cross-referencing opinion polls × prediction markets for Mexico's 2024 presidential election (single round, 2 June 2024), in the same spirit as the AFOS Brazil 2026 dataset: sources reported side by side with explicit divergence, never blended into a single average.
Maintained by AFOS Analytics. No personal data, only public electoral information. Candidate-level: the polls measure candidate vote share, while the market prices the probability of winning the presidency. These are two different quantities, and the gap between them is the signal.
Press coverage layer
The qualitative third axis of the AFOS cross (market x polls x press) is now a structured file: news/mexico-2024-press-coverage.csv, 9 dated headlines from 5 national outlets across the cycle (polls, election, result, analysis), in ES. Headlines and links only (outlets retain copyright); dates are publication/coverage dates, best-effort. It complements the quantitative market-vs-poll divergence; it is not sentiment-scored.
English
Sheinbaum won, and the market had called it from January
Claudia Sheinbaum won the 2024 presidential election with about 59.8% of the vote, the largest vote count in Mexican history, and became the country's first woman president. The signal showed early: from January the market already gave Sheinbaum about 90% probability of winning, while the polls measured her vote share around 50% (the Oraculus aggregate closed near 54%). The market treated the race as decided long before election day, and the actual result ran even higher than the polls suggested. Where some polls still showed a contest, the market read the outcome.
Official result: Claudia Sheinbaum (Morena) 59.8% · Xóchitl Gálvez (PAN-PRI-PRD) 27.5% · Jorge Álvarez Máynez (Movimiento Ciudadano) 10.3%.
Contents (start with the polls):
| Path | Rows | Content |
|---|---|---|
polls/mexico-polls.csv |
147 | Candidate vote-share polling, long format (one row per candidate × poll), 3 candidates, 49 polls, Jan to May 2024. |
polls/mexico-polls.json |
n/a | Full structured polls (pollster, fieldwork, sample, per-candidate results). |
data/mexico-market-odds-timeseries.csv |
552 | Daily Polymarket probability of winning the presidency per candidate (4 series, Jan to Jun 2024) from the "Mexico Presidential Election Winner" market (total volume US$ 2.08M). |
data/mexico-divergence-timeseries.csv |
135 | Market × poll divergence per candidate, each poll's vote share joined to that candidate's market odds on its date. |
data/mexico-poly-raw.json |
n/a | Raw Polymarket payload, kept for provenance. |
Market fetched from Polymarket's gamma-api plus clob via a US-resolving function. Single-round presidential election. Post-election resolution points were dropped, so the series ends on election day.
⚖️ Notable divergences (why divergence beats the average)
The market prices who wins the presidency, the polls measure vote share. In 2024 the market was confident and early, and the result proved it right.
- Sheinbaum: 90% in the market from day one, while polls measured about 50% of the vote. The two are different quantities, probability of winning versus vote share, so the about 40-point gap is not a polling error. What matters is that the market never wavered from a near-certain Sheinbaum win, and the result (59.8%) came in above the final polls, which had her closer to 50 to 54%. The polls understated the margin, the market did not.
- Gálvez: some polls put her in the 33 to 40% range, the market never gave her more than about 11% to win. The market simply did not believe the contest was close. The result validated it: Gálvez finished at 27.5%, roughly 31 points behind.
- Máynez: a steady distant third. Polls around 10%, market near 0% to win, result 10.3%. Vote share and "winning" were never the same question for him.
The reading: vote share tells you how Mexico voted, the market told you the presidency was settled months ahead. A blended poll average, especially one fed by the more competitive-looking polls, would have understated how decided the race already was.
Press and forecast layer
The poll and market series were cross-read against five free public sources, the same kind AFOS audits daily for Brazil: Oraculus (the leading Mexican poll-of-polls), the INE public registry of electoral polls (the official source that pollsters must file with), AS/COA's Mexico poll tracker (English-language), Milenio (which ran its own campaign tracking poll), and Animal Político (independent fact-checking).
Pollsters covered: El Financiero, Mitofsky, De las Heras, Enkoll, GEA-ISA, Reforma, AtlasIntel, Áltica, MEBA, LaEncuesta.mx, Massive Caller, and others.
Provenance and method: poll figures compiled deterministically (rowspan/colspan-aware HTML parser) from the public Wikipedia aggregation "Opinion polling for the 2024 Mexican general election." Poll-of-poll aggregators (Oraculus, Polls.mx) were excluded from the per-poll table. Market odds from the public Polymarket market. Nothing imputed or smoothed, missing values left blank.
License (dual): the data (CSV, JSON) are released under CC BY 4.0, the code (parse-mexico-wiki.mjs, build-mexico-market-divergence.mjs) under Apache 2.0 (see LICENSE and LICENSE-APACHE). Underlying poll numbers are facts released by the named pollsters, the Wikipedia aggregation is CC BY-SA. Please attribute AFOS Analytics and the original pollsters.
Cite: AFOS Analytics. Mexico 2024 Electoral Divergence Dataset. Hugging Face, 2026. CC BY 4.0. (see CITATION.cff)
Disclaimer: observational research. Not investment advice, not voting guidance.
Português
Dataset aberto cruzando pesquisas × mercados de previsão para a eleição presidencial do México de 2024 (turno único, 02/jun/2024). Nível candidato: as pesquisas medem voto por candidato, o mercado precifica a probabilidade de vencer a presidência. Duas grandezas diferentes, e a distância entre elas é o sinal.
Sheinbaum venceu, e o mercado já sabia desde janeiro
Claudia Sheinbaum venceu a eleição presidencial de 2024 com cerca de 59,8% dos votos, a maior votação da história do México, e tornou-se a primeira mulher presidente do país. O sinal apareceu cedo: desde janeiro o mercado já dava a Sheinbaum cerca de 90% de probabilidade de vencer, enquanto as pesquisas mediam seu voto em torno de 50%. O mercado tratou a eleição como decidida muito antes da urna, e o resultado real veio ainda mais alto que as pesquisas indicavam.
Resultado oficial: Claudia Sheinbaum (Morena) 59,8% · Xóchitl Gálvez (PAN-PRI-PRD) 27,5% · Jorge Álvarez Máynez (Movimiento Ciudadano) 10,3%.
polls/mexico-polls.csv: voto por candidato, formato largo, 3 candidatos, 49 pesquisas (jan a mai 2024).data/mexico-market-odds-timeseries.csv/mexico-divergence-timeseries.csv: probabilidade Polymarket de vencer a presidência por candidato (volume total US$ 2,08 mi) e divergência mercado × pesquisa.
⚖️ Divergências em destaque
- Sheinbaum: 90% no mercado desde o primeiro dia, enquanto a pesquisa media cerca de 50% do voto. São grandezas diferentes (probabilidade de vencer × voto), então o gap de cerca de 40 pontos não é erro de pesquisa. O que importa: o mercado nunca abandonou a vitória quase certa de Sheinbaum, e o resultado (59,8%) veio acima das pesquisas finais, que a colocavam mais perto de 50 a 54%. A pesquisa subestimou a margem, o mercado não.
- Gálvez: algumas pesquisas a colocavam na faixa de 33 a 40%, o mercado nunca lhe deu mais que cerca de 11% de vencer. O mercado simplesmente não acreditou que a disputa fosse apertada. O resultado validou: Gálvez terminou com 27,5%, cerca de 31 pontos atrás.
- Máynez: um terceiro lugar distante e estável. Pesquisa em torno de 10%, mercado perto de 0% de vencer, resultado 10,3%.
A leitura: o voto diz como o México votou, o mercado disse que a presidência estava resolvida com meses de antecedência. Uma média de pesquisas teria subestimado o quanto a disputa já estava decidida.
Camada de imprensa: as séries foram cruzadas com cinco fontes públicas e gratuitas (Oraculus, o registro oficial de pesquisas do INE, o tracker da AS/COA, o Milenio e o Animal Político), o mesmo tipo de fonte que a AFOS audita diariamente no Brasil.
Español
Dataset abierto que cruza encuestas × mercados de predicción para la elección presidencial de México de 2024 (vuelta única, 02 jun 2024). Nivel candidato: las encuestas miden voto por candidato, el mercado valora la probabilidad de ganar la presidencia.
Ganó Sheinbaum, y el mercado ya lo sabía desde enero
Claudia Sheinbaum ganó la elección presidencial de 2024 con cerca del 59,8% de los votos, la mayor votación en la historia de México, y se convirtió en la primera mujer presidenta del país. La señal apareció temprano: desde enero el mercado ya daba a Sheinbaum cerca del 90% de probabilidad de ganar, mientras las encuestas medían su voto en torno al 50%. El mercado trató la elección como decidida mucho antes, y el resultado real fue aún más alto que lo que indicaban las encuestas.
Resultado oficial: Claudia Sheinbaum (Morena) 59,8% · Xóchitl Gálvez (PAN-PRI-PRD) 27,5% · Jorge Álvarez Máynez (Movimiento Ciudadano) 10,3%.
⚖️ Divergencias destacadas
- Sheinbaum: 90% en el mercado desde el primer día, mientras la encuesta medía cerca de 50% del voto. Son grandezas diferentes (probabilidad de ganar × voto), así que la brecha de cerca de 40 puntos no es error de encuesta. El mercado nunca abandonó la victoria casi segura de Sheinbaum, y el resultado (59,8%) llegó por encima de las encuestas finales. La encuesta subestimó el margen, el mercado no.
- Gálvez: algunas encuestas la ponían entre 33 y 40%, el mercado nunca le dio más de cerca de 11% de ganar. El resultado lo validó: Gálvez terminó con 27,5%, unos 31 puntos atrás.
- Máynez: un tercer lugar distante. Encuesta en torno al 10%, mercado cerca de 0% de ganar, resultado 10,3%.
Fuente: agregación pública de Wikipedia, Polymarket, cruzadas con Oraculus, el registro del INE, AS/COA, Milenio y Animal Político. Licencia (dual): datos CC BY 4.0, código Apache 2.0 (atribuir a AFOS Analytics y a las encuestadoras). Investigación observacional, no es asesoría de inversión.
Sources / Fontes / Fuentes: Pollsters (El Financiero, Mitofsky, Enkoll, …) · Oraculus · INE registro de encuestas · AS/COA poll tracker · Wikipedia aggregation · Polymarket. Column definitions in DATA_DICTIONARY.md.
Structural context (World Bank)
Beyond the divergence data, this dataset ships data/mexico-structural-context.csv: official, open World Bank indicators that frame the country, governance (Worldwide Governance Indicators, 0-100 scale) plus economy & education (World Development Indicators: population, GDP, GDP per capita, inflation, public education spending, expected years of schooling). These are annual structural indicators that contextualize the country; they do not predict the electoral outcome. Columns are documented in DATA_DICTIONARY.md.
Provenance and reproducibility (v1.2.0)
- raw/ vs. derived.
raw/holds immutable source pulls: the Polymarket snapshot(s) (*-poly-raw.json) and the official result (mexico-2024-official-result.json). The CSVs underdata/,polls/andnews/are derived/transcribed series. - Validated against the official result. Winner: Claudia Sheinbaum (Sigamos Haciendo Historia). Source: Instituto Nacional Electoral (INE), computo oficial. See
raw/mexico-2024-official-result.json. - Poll disclosure. The poll series carries per-row pollster, fieldwork date and sample size. Each poll row now carries a page-level
source_url(the Wikipedia opinion-polling page it was compiled from: https://en.wikipedia.org/wiki/Opinion_polling_for_the_2024_Mexican_general_election); per-pollster report URLs remain a future enhancement (the source aggregation footnotes were not retained per row). - Integrity.
datapackage.json(Frictionless, validated),croissant.json(MLCommons) andCHECKSUMS.txt(SHA-256) describe and verify every file.
📬 The method, and where it runs live
English · This is one of the elections AFOS has validated against the official result. How the validation works and what qualifies as a case: the method and methodology. The same method runs live on Brazil 2026, published every day in AFOS Daily, free by email.
Português · Esta é uma das eleições que o AFOS validou contra o resultado oficial. Como a validação funciona e o que qualifica um caso: o método e a metodologia. O mesmo método roda ao vivo no Brasil 2026, publicado todos os dias no AFOS Daily, gratuito por e-mail.
Español · Esta es una de las elecciones que AFOS validó contra el resultado oficial. Cómo funciona la validación y qué califica como caso: el método y la metodología. El mismo método corre en vivo en Brasil 2026, publicado todos los días en AFOS Daily, gratis por correo.
- Downloads last month
- 137


