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
...
: 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
url: string
cr:conformsTo: string
distribution: list<item: struct<@type: string, @id: string, name: string, contentUrl: string, encodingFormat: stri (... 20 chars omitted)
child 0, item: struct<@type: string, @id: string, name: string, contentUrl: string, encodingFormat: string, sha256: (... 8 chars omitted)
child 0, @type: string
child 1, @id: string
child 2, name: string
child 3, contentUrl: string
child 4, encodingFormat: string
child 5, sha256: 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
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
...
: 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
url: string
cr:conformsTo: string
distribution: list<item: struct<@type: string, @id: string, name: string, contentUrl: string, encodingFormat: stri (... 20 chars omitted)
child 0, item: struct<@type: string, @id: string, name: string, contentUrl: string, encodingFormat: string, sha256: (... 8 chars omitted)
child 0, @type: string
child 1, @id: string
child 2, name: string
child 3, contentUrl: string
child 4, encodingFormat: string
child 5, sha256: 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
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 · Canada 2025 Electoral Divergence Dataset
🌐 English · Português · Español
Open dataset cross-referencing opinion polls × prediction markets for Canada's 2025 federal election (House of Commons, 28 April 2025), in the same spirit as the AFOS Brazil 2026 dataset: sources reported side by side with explicit divergence, not blended into one average.
Maintained by AFOS Analytics. No personal data, only public electoral information. Party-level: polls measure party vote share; the market prices the probability of winning the most seats (FPTP plurality), two different quantities, and the gap 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/canada-2025-press-coverage.csv, 7 dated headlines from 6 national outlets across the cycle (polls, election, result, analysis), in EN/FR. 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
Contents (start with the polls):
| Path | Rows | Content |
|---|---|---|
polls/canada-polls.csv |
2,578 | Party vote-share polling, long format (one row per party × poll), 6 parties, 437 polls, 2024→Apr 2025. |
polls/canada-polls.json |
n/a | Full structured polls (pollster, fieldwork, sample, per-party results). |
data/canada-market-odds-timeseries.csv |
684 | Daily Polymarket "wins the most seats" probability per party (6 parties, Jan→Apr 2025) from the "Which Party wins most seats in Canadian election?" market. |
data/canada-divergence-timeseries.csv |
1,190 | Market × poll divergence per party, each poll's party vote share joined to that party's market odds on its date. |
data/canada-poly-raw.json |
n/a | Raw Polymarket payload, kept for provenance. |
Market fetched from Polymarket's gamma-api + clob via a US-resolving function. FPTP parliamentary system: one vote, no runoff; seats ≠ vote share.
⚖️ Notable divergences (why divergence beats the average)
The market prices which party wins the most seats; the polls measure vote share. In a first-past-the-post system these come apart, and in 2025 they moved in one of the most dramatic reversals a prediction market has tracked.
- The great reversal (Conservative → Liberal). In late January 2025 the market gave the Conservatives about 85% to win the most seats; by late April it had flipped to the Liberals about 80%, while the two parties' vote shares stayed within a few points of each other the whole time. The trigger (Trudeau's resignation, Mark Carney's rise, and the tariff shock) repriced the winner long before vote-share polls told a clean story. The Liberals won the most seats (169 to 144), validating the market's final read.
- Seats vs votes. On election day the Liberals took about 43.8% of the vote to the Conservatives' about 41.3%, a roughly 2.5 pp gap, yet won a clear seat plurality. The market priced the plurality, not the vote margin; the divergence series shows that distinction day by day.
- The smaller parties (NDP, Bloc, Green): held meaningful vote share (NDP about 6-8%, Bloc about 6%) but about 0% probability of winning the most seats throughout, vote share and "winning" were never the same question for them.
The reading: vote share tells you how Canadians voted; the market tells you who was going to win the House, and in 2025 the two diverged violently before converging on the Liberals. A blended poll average would have shown a near-tie; only the market-versus-poll spread captures the swing.
Pollsters covered: Nanos, Léger, Abacus Data, Ekos, Ipsos, Angus Reid, Mainstreet, Research Co., and others.
Provenance & method: poll figures compiled deterministically (rowspan/colspan-aware HTML parser) from the public Wikipedia aggregation "Opinion polling for the 2025 Canadian federal election." Market odds from the public Polymarket market. Nothing imputed or smoothed; missing values left blank.
License (dual): data → CC BY 4.0 (LICENSE-CC-BY-4.0); code/scripts → Apache 2.0 (LICENSE-APACHE-2.0), matching the repo root and the Hugging Face mirror. 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. Canada 2025 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 federal canadense de 2025 (Câmara dos Comuns, 28/abr/2025). Nível partido: as pesquisas medem voto por partido; o mercado precifica a probabilidade de vencer mais cadeiras (pluralidade FPTP).
polls/canada-polls.csv, voto por partido, formato largo, 6 partidos, 437 pesquisas (2024→abr 2025).data/canada-market-odds-timeseries.csv/canada-divergence-timeseries.csv, probabilidade Polymarket de "vencer mais cadeiras" por partido e divergência mercado × pesquisa.
⚖️ Divergências em destaque
- A grande virada (Conservadores → Liberais). Fim de janeiro/2025: o mercado dava cerca de 85% aos Conservadores de vencer mais cadeiras; fim de abril virou cerca de 80% aos Liberais, enquanto o voto dos dois ficou a poucos pontos um do outro o tempo todo. O gatilho (renúncia de Trudeau, ascensão de Mark Carney, choque tarifário) reprecificou o vencedor muito antes de o voto contar uma história limpa. Os Liberais venceram mais cadeiras (169 a 144), validando a leitura final do mercado.
- Cadeiras × votos. No dia, Liberais cerca de 43,8% do voto contra cerca de 41,3% dos Conservadores (cerca de 2,5pp), mas pluralidade de cadeiras clara. O mercado precificou a pluralidade, não a margem de voto.
- Partidos menores (NDP, Bloc, Verdes): voto relevante (NDP cerca de 6-8%, Bloc cerca de 6%) mas cerca de 0% de chance de vencer mais cadeiras, voto e "vencer" nunca foram a mesma pergunta.
A leitura: o voto diz como os canadenses votaram; o mercado diz quem ia vencer a Câmara, e em 2025 os dois divergiram violentamente antes de convergir nos Liberais. Uma média esconde a virada.
Español
Dataset abierto que cruza encuestas × mercados de predicción para la elección federal canadiense de 2025 (Cámara de los Comunes, 28 abr 2025). Nivel partido: las encuestas miden voto por partido; el mercado valora la probabilidad de ganar más escaños (pluralidad FPTP).
⚖️ Divergencias destacadas
- El gran vuelco (Conservadores → Liberales). Fines de enero: el mercado daba cerca de 85% a los Conservadores de ganar más escaños; fines de abril viró a cerca de 80% a los Liberales, mientras el voto de ambos quedó a pocos puntos todo el tiempo. Los Liberales ganaron más escaños (169 a 144).
- Escaños vs votos. Liberales cerca de 43,8% del voto contra cerca de 41,3% (cerca de 2,5pp) pero pluralidad clara de escaños. El mercado valoró la pluralidad, no el margen de voto.
- Partidos menores: voto relevante pero cerca de 0% de ganar más escaños.
Fuente: agregación pública de Wikipedia; Polymarket. Licencia: CC BY 4.0 (atribuir a AFOS Analytics y a las encuestadoras). Investigación observacional; no es asesoría de inversión.
Sources / Fontes / Fuentes: Pollsters (Nanos, Léger, Abacus, Ekos, …) · Wikipedia aggregation · Polymarket. Column definitions in DATA_DICTIONARY.md.
Structural context (World Bank)
Beyond the divergence data, this dataset ships data/canada-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 (canada-2025-official-result.json). The CSVs underdata/,polls/andnews/are derived/transcribed series. - Validated against the official result. Winner: Liberal Party (Mark Carney). Source: Elections Canada. See
raw/canada-2025-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_2025_Canadian_federal_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
- 300


