Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 2 new columns ({'date', 'volume_usd'}) and 5 missing columns ({'polymarket_date', 'poll_date', 'poll_pct', 'pollster', 'divergence_pp'}).

This happened while the csv dataset builder was generating data using

hf://datasets/AFOS-Analytics1/canada-2025-electoral-divergence/data/canada-market-odds-timeseries.csv (at revision 4aac4592e7134265f90e661f9506f1e0e119e10b), ['hf://datasets/AFOS-Analytics1/canada-2025-electoral-divergence@4aac4592e7134265f90e661f9506f1e0e119e10b/data/canada-divergence-timeseries.csv', 'hf://datasets/AFOS-Analytics1/canada-2025-electoral-divergence@4aac4592e7134265f90e661f9506f1e0e119e10b/data/canada-market-odds-timeseries.csv', 'hf://datasets/AFOS-Analytics1/canada-2025-electoral-divergence@4aac4592e7134265f90e661f9506f1e0e119e10b/polls/canada-polls.csv']

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
                  writer.write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 765, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 773, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              date: string
              party: string
              polymarket_pct: double
              volume_usd: int64
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 725
              to
              {'poll_date': Value('string'), 'pollster': Value('string'), 'party': Value('string'), 'poll_pct': Value('float64'), 'polymarket_pct': Value('float64'), 'polymarket_date': Value('string'), 'divergence_pp': Value('float64')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1361, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 940, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1683, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1839, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 2 new columns ({'date', 'volume_usd'}) and 5 missing columns ({'polymarket_date', 'poll_date', 'poll_pct', 'pollster', 'divergence_pp'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/AFOS-Analytics1/canada-2025-electoral-divergence/data/canada-market-odds-timeseries.csv (at revision 4aac4592e7134265f90e661f9506f1e0e119e10b), ['hf://datasets/AFOS-Analytics1/canada-2025-electoral-divergence@4aac4592e7134265f90e661f9506f1e0e119e10b/data/canada-divergence-timeseries.csv', 'hf://datasets/AFOS-Analytics1/canada-2025-electoral-divergence@4aac4592e7134265f90e661f9506f1e0e119e10b/data/canada-market-odds-timeseries.csv', 'hf://datasets/AFOS-Analytics1/canada-2025-electoral-divergence@4aac4592e7134265f90e661f9506f1e0e119e10b/polls/canada-polls.csv']
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

poll_date
string
pollster
string
party
string
poll_pct
float64
polymarket_pct
float64
polymarket_date
string
divergence_pp
float64
2025-01-26
Mainstreet Research
Liberal
40
7.8
2025-01-26
-32.2
2025-01-26
Mainstreet Research
Conservative
38
90
2025-01-26
52
2025-01-26
Mainstreet Research
NDP
12
0.7
2025-01-26
-11.3
2025-01-26
Mainstreet Research
Green
4
0.4
2025-01-26
-3.6
2025-01-26
Mainstreet Research
People's Party
2
0.4
2025-01-26
-1.6
2025-01-27
Angus Reid
Conservative
43
90.5
2025-01-27
47.5
2025-01-27
Angus Reid
Liberal
29
8
2025-01-27
-21
2025-01-27
Angus Reid
NDP
13
0.5
2025-01-27
-12.5
2025-01-27
Angus Reid
Bloc Québécois
10
0.4
2025-01-27
-9.6
2025-01-27
Angus Reid
Green
3
0.4
2025-01-27
-2.6
2025-01-27
Angus Reid
People's Party
1
0.4
2025-01-27
-0.6
2025-01-30
Mainstreet Research
Liberal
40
12.4
2025-01-30
-27.6
2025-01-30
Mainstreet Research
Conservative
39
85.5
2025-01-30
46.5
2025-01-30
Mainstreet Research
NDP
13
0.5
2025-01-30
-12.5
2025-01-30
Mainstreet Research
Green
5
0.4
2025-01-30
-4.6
2025-01-30
Mainstreet Research
People's Party
2
0.4
2025-01-30
-1.6
2025-01-31
Mainstreet Research
Liberal
39
12.8
2025-01-31
-26.2
2025-01-31
Mainstreet Research
Conservative
39
85.5
2025-01-31
46.5
2025-01-31
Mainstreet Research
NDP
14
0.5
2025-01-31
-13.5
2025-01-31
Mainstreet Research
Green
3
0.4
2025-01-31
-2.6
2025-01-31
Mainstreet Research
People's Party
1
0.4
2025-01-31
-0.6
2025-02-01
Mainstreet Research
Liberal
41
13
2025-02-01
-28
2025-02-01
Mainstreet Research
Conservative
40
85
2025-02-01
45
2025-02-01
Mainstreet Research
NDP
13
0.5
2025-02-01
-12.5
2025-02-01
Mainstreet Research
Green
3
0.4
2025-02-01
-2.6
2025-02-01
Mainstreet Research
People's Party
2
0.4
2025-02-01
-1.6
2025-02-02
Mainstreet Research
Liberal
42
13
2025-02-02
-29
2025-02-02
Mainstreet Research
Conservative
39
85
2025-02-02
46
2025-02-02
Mainstreet Research
NDP
11
0.5
2025-02-02
-10.5
2025-02-02
Mainstreet Research
Green
3
0.4
2025-02-02
-2.6
2025-02-02
Mainstreet Research
People's Party
2
0.4
2025-02-02
-1.6
2025-02-03
Mainstreet Research
Liberal
43
13.1
2025-02-03
-29.9
2025-02-03
Mainstreet Research
Conservative
39
85.5
2025-02-03
46.5
2025-02-03
Mainstreet Research
NDP
9
0.5
2025-02-03
-8.5
2025-02-03
Mainstreet Research
Green
4
0.4
2025-02-03
-3.6
2025-02-03
Mainstreet Research
People's Party
2
0.4
2025-02-03
-1.6
2025-02-04
Mainstreet Research
Liberal
42
12.7
2025-02-04
-29.3
2025-02-04
Mainstreet Research
Conservative
37
86
2025-02-04
49
2025-02-04
Mainstreet Research
NDP
11
0.5
2025-02-04
-10.5
2025-02-04
Mainstreet Research
Green
4
0.4
2025-02-04
-3.6
2025-02-04
Mainstreet Research
People's Party
2
0.4
2025-02-04
-1.6
2025-02-05
Mainstreet Research
Liberal
42
13.3
2025-02-05
-28.7
2025-02-05
Mainstreet Research
Conservative
37
85
2025-02-05
48
2025-02-05
Mainstreet Research
NDP
12
0.5
2025-02-05
-11.5
2025-02-05
Mainstreet Research
Green
4
0.4
2025-02-05
-3.6
2025-02-05
Mainstreet Research
People's Party
2
0.4
2025-02-05
-1.6
2025-02-06
Pallas Data
Conservative
38
85
2025-02-06
47
2025-02-06
Pallas Data
Liberal
39
13.3
2025-02-06
-25.7
2025-02-06
Pallas Data
NDP
9
0.4
2025-02-06
-8.6
2025-02-06
Pallas Data
Bloc Québécois
7
0.3
2025-02-06
-6.7
2025-02-06
Pallas Data
Green
3
0.4
2025-02-06
-2.6
2025-02-06
Pallas Data
People's Party
2
0.4
2025-02-06
-1.6
2025-02-06
Mainstreet Research
Liberal
42
13.3
2025-02-06
-28.7
2025-02-06
Mainstreet Research
Conservative
36
85
2025-02-06
49
2025-02-06
Mainstreet Research
NDP
14
0.4
2025-02-06
-13.6
2025-02-06
Mainstreet Research
Green
3
0.4
2025-02-06
-2.6
2025-02-06
Mainstreet Research
People's Party
2
0.4
2025-02-06
-1.6
2025-02-07
Mainstreet Research
Liberal
44
13.9
2025-02-07
-30.1
2025-02-07
Mainstreet Research
Conservative
36
84.5
2025-02-07
48.5
2025-02-07
Mainstreet Research
NDP
12
0.4
2025-02-07
-11.6
2025-02-07
Mainstreet Research
Green
4
0.4
2025-02-07
-3.6
2025-02-07
Mainstreet Research
People's Party
2
0.4
2025-02-07
-1.6
2025-02-08
Mainstreet Research
Liberal
42
13.6
2025-02-08
-28.4
2025-02-08
Mainstreet Research
Conservative
36
84.5
2025-02-08
48.5
2025-02-08
Mainstreet Research
NDP
13
0.4
2025-02-08
-12.6
2025-02-08
Mainstreet Research
Green
4
0.4
2025-02-08
-3.6
2025-02-08
Mainstreet Research
People's Party
2
0.3
2025-02-08
-1.7
2025-02-09
Mainstreet Research
Liberal
43
17.1
2025-02-09
-25.9
2025-02-09
Mainstreet Research
Conservative
39
81.5
2025-02-09
42.5
2025-02-09
Mainstreet Research
NDP
9
0.4
2025-02-09
-8.6
2025-02-09
Mainstreet Research
Green
5
0.3
2025-02-09
-4.7
2025-02-09
Mainstreet Research
People's Party
2
0.3
2025-02-09
-1.7
2025-02-10
Leger
Conservative
37
77
2025-02-10
40
2025-02-10
Leger
Liberal
37
21.5
2025-02-10
-15.5
2025-02-10
Leger
NDP
12
0.3
2025-02-10
-11.7
2025-02-10
Leger
Bloc Québécois
6
0.3
2025-02-10
-5.7
2025-02-10
Leger
Green
5
0.3
2025-02-10
-4.7
2025-02-10
Leger
People's Party
2
0.3
2025-02-10
-1.7
2025-02-10
Mainstreet Research
Liberal
45
21.5
2025-02-10
-23.5
2025-02-10
Mainstreet Research
Conservative
37
77
2025-02-10
40
2025-02-10
Mainstreet Research
NDP
12
0.3
2025-02-10
-11.7
2025-02-10
Mainstreet Research
Green
2
0.3
2025-02-10
-1.7
2025-02-10
Mainstreet Research
People's Party
1
0.3
2025-02-10
-0.7
2025-02-11
Abacus Data
Conservative
45
76
2025-02-11
31
2025-02-11
Abacus Data
Liberal
28
23
2025-02-11
-5
2025-02-11
Abacus Data
NDP
12
0.3
2025-02-11
-11.7
2025-02-11
Abacus Data
Bloc Québécois
10
0.3
2025-02-11
-9.7
2025-02-11
Abacus Data
Green
3
0.3
2025-02-11
-2.7
2025-02-11
Mainstreet Research
Liberal
43
23
2025-02-11
-20
2025-02-11
Mainstreet Research
Conservative
39
76
2025-02-11
37
2025-02-11
Mainstreet Research
NDP
10
0.3
2025-02-11
-9.7
2025-02-11
Mainstreet Research
Green
2
0.3
2025-02-11
-1.7
2025-02-11
Mainstreet Research
People's Party
2
0.3
2025-02-11
-1.7
2025-02-12
Mainstreet Research
Liberal
43
30
2025-02-12
-13
2025-02-12
Mainstreet Research
Conservative
40
69
2025-02-12
29
2025-02-12
Mainstreet Research
NDP
10
0.3
2025-02-12
-9.7
2025-02-12
Mainstreet Research
Green
2
0.3
2025-02-12
-1.7
2025-02-12
Mainstreet Research
People's Party
2
0.3
2025-02-12
-1.7
2025-02-13
Mainstreet Research
Conservative
37
70
2025-02-13
33
2025-02-13
Mainstreet Research
Liberal
40
28.4
2025-02-13
-11.6
End of preview.

AFOS · Canada 2025 Electoral Divergence

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.


English

Polymarket implied probability of winning over the campaign

Market probability of winning versus poll vote share on the eve of the vote

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 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 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 ~85% to win the most seats; by late April it had flipped to the Liberals ~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 ~43.8% of the vote to the Conservatives' ~41.3% — a ~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 ~6–8%, Bloc ~6%) but ~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 ~85% aos Conservadores de vencer mais cadeiras; fim de abril virou ~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 43,8% do voto contra ~41,3% dos Conservadores (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 ~6-8%, Bloc ~6%) mas ~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 ~85% a los Conservadores de ganar más escaños; fines de abril viró a ~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 43,8% del voto contra ~41,3% (2,5pp) pero pluralidad clara de escaños. El mercado valoró la pluralidad, no el margen de voto.
  • Partidos menores: voto relevante pero ~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.

Downloads last month
88