Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
description: string
source: string
election: struct<date: timestamp[s], type: string, note: string>
  child 0, date: timestamp[s]
  child 1, type: string
  child 2, note: string
counts: struct<polls: int64, rows: int64>
  child 0, polls: int64
  child 1, rows: int64
polls: list<item: struct<poll_date: timestamp[s], fieldwork: string, pollster: string, sample: int64, resul (... 90 chars omitted)
  child 0, item: struct<poll_date: timestamp[s], fieldwork: string, pollster: string, sample: int64, results: list<it (... 78 chars omitted)
      child 0, poll_date: timestamp[s]
      child 1, fieldwork: string
      child 2, pollster: string
      child 3, sample: int64
      child 4, results: list<item: struct<token: string, candidate: string, party: string, percent: double>>
          child 0, item: struct<token: string, candidate: string, party: string, percent: double>
              child 0, token: string
              child 1, candidate: string
              child 2, party: string
              child 3, percent: double
slug: string
title: string
markets: int64
odds: list<item: struct<candidate: string, volume: double, closed: bool, history: list<item: struct<t: int (... 17 chars omitted)
  child 0, item: struct<candidate: string, volume: double, closed: bool, history: list<item: struct<t: int64, p: doub (... 5 chars omitted)
      child 0, candidate: string
      child 1, volume: double
      child 2, closed: bool
      child 3, history: list<item: struct<t: int64, p: double>>
          child 0, item: struct<t: int64, p: double>
              child 0, t: int64
              child 1, p: double
endDate: timestamp[s]
startDate: string
to
{'title': Value('string'), 'slug': Value('string'), 'startDate': Value('string'), 'endDate': Value('timestamp[s]'), 'markets': Value('int64'), 'odds': List({'candidate': Value('string'), 'volume': Value('float64'), 'closed': Value('bool'), 'history': List({'t': Value('int64'), 'p': Value('float64')})})}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                         ^^^^^^^^^
                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 127, 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 478, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2815, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2352, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2377, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.12/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.12/site-packages/datasets/packaged_modules/json/json.py", line 310, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 130, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_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
              description: string
              source: string
              election: struct<date: timestamp[s], type: string, note: string>
                child 0, date: timestamp[s]
                child 1, type: string
                child 2, note: string
              counts: struct<polls: int64, rows: int64>
                child 0, polls: int64
                child 1, rows: int64
              polls: list<item: struct<poll_date: timestamp[s], fieldwork: string, pollster: string, sample: int64, resul (... 90 chars omitted)
                child 0, item: struct<poll_date: timestamp[s], fieldwork: string, pollster: string, sample: int64, results: list<it (... 78 chars omitted)
                    child 0, poll_date: timestamp[s]
                    child 1, fieldwork: string
                    child 2, pollster: string
                    child 3, sample: int64
                    child 4, results: list<item: struct<token: string, candidate: string, party: string, percent: double>>
                        child 0, item: struct<token: string, candidate: string, party: string, percent: double>
                            child 0, token: string
                            child 1, candidate: string
                            child 2, party: string
                            child 3, percent: double
              slug: string
              title: string
              markets: int64
              odds: list<item: struct<candidate: string, volume: double, closed: bool, history: list<item: struct<t: int (... 17 chars omitted)
                child 0, item: struct<candidate: string, volume: double, closed: bool, history: list<item: struct<t: int64, p: doub (... 5 chars omitted)
                    child 0, candidate: string
                    child 1, volume: double
                    child 2, closed: bool
                    child 3, history: list<item: struct<t: int64, p: double>>
                        child 0, item: struct<t: int64, p: double>
                            child 0, t: int64
                            child 1, p: double
              endDate: timestamp[s]
              startDate: string
              to
              {'title': Value('string'), 'slug': Value('string'), 'startDate': Value('string'), 'endDate': Value('timestamp[s]'), 'markets': Value('int64'), 'odds': List({'candidate': Value('string'), 'volume': Value('float64'), 'closed': Value('bool'), 'history': List({'t': Value('int64'), 'p': Value('float64')})})}
              because column names don't match

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.

AFOS · United Kingdom 2024 Electoral Divergence

AFOS · United Kingdom 2024 Electoral Divergence Dataset

🌐 English · Português · Español

Open dataset cross-referencing opinion polls × prediction markets for the United Kingdom's 2024 general election (House of Commons, 4 July 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. Party-level: the polls measure party vote share, while the market prices the probability of winning the most seats under first-past-the-post. These are two different quantities, and the gap between them is the signal.


English

Labour won, and the market had already priced the magnitude

Keir Starmer's Labour took 411 of the 650 seats. On the eve of the vote the prediction market (total volume US$ 1.76 million) gave Labour a 99% chance of winning the most seats, while the polls measured around 40% of vote intention. This is not a contradiction: the market prices who wins, the polls measure vote share, and Britain's first-past-the-post system turned 33.7% of the vote into 63% of the seats. Where a naive reading saw a number, the signal read the outcome.

Official result: Labour 411 seats (33.7% of the vote) · Conservative 121 (23.7%) · Liberal Democrats 72 (12.2%) · SNP 9 (2.5%) · Reform UK 5 (14.3%) · Green 4 (6.8%) · Plaid Cymru 4 (0.7%).

Polymarket probability of winning the most seats over the 2024 campaign

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

Contents (start with the polls):

Path Rows Content
polls/uk-polls.csv 1,907 Party vote-share polling, long format (one row per party × poll), 7 parties, 293 polls, Jan to Jul 2024.
polls/uk-polls.json n/a Full structured polls (pollster, fieldwork, sample, per-party results).
data/uk-market-odds-timeseries.csv 325 Daily Polymarket "wins the most seats" probability per party (5 series, May to Jul 2024) from the "Which party wins the most seats after UK Election?" market (total volume US$ 1.76M).
data/uk-divergence-timeseries.csv 648 Market × poll divergence per party, each poll's party vote share joined to that party's market odds on its date.
data/uk-poly-raw.json n/a Raw Polymarket payload (the most-seats market), kept for provenance.
data/uk-poly-vote-share-raw.json n/a Raw payload for the secondary "Labour vote share" market.

Market fetched from Polymarket's gamma-api plus clob via a US-resolving function. FPTP parliamentary system: one vote, no runoff. Seats are not the same as vote share. Post-election resolution points were dropped, so the series ends on election day.

⚖️ Notable divergences (why divergence beats the average)

The market prices which party wins the most seats, the polls measure vote share, and under first-past-the-post these come apart. In 2024 they agreed on the winner but split sharply on the scale.

  • The landslide the market had already priced (Labour). Labour led every poll, around 39 to 41% of the vote, and the market gave it roughly 99% to win the most seats on the eve of the election. Both agreed on direction. The scale is where they part: Labour won 411 of 650 seats, about 63% of the chamber, on 33.7% of the vote. Probability of winning, vote share, and seat share are three different numbers, and the system pulled them apart.
  • Reform UK: third in votes, almost nothing in the market, and the market was right. Reform polled around 14 to 17% through the campaign, third nationally, yet the market never gave it more than about 1% to win the most seats. The result confirmed the read: 14.3% of the vote became just 5 seats. The market understood the electoral system better than a direct reading of the polls.
  • Liberal Democrats versus Reform: the clearest seats-versus-votes split. The Lib Dems took 12.2% of the vote and 72 seats, while Reform took more votes, 14.3%, and only 5 seats. Geographically concentrated support wins seats, evenly spread support does not. Vote share alone would rank the two the wrong way around.

The reading: vote share tells you how Britain voted, the market told you who would command the Commons. In 2024 the two converged on Labour in direction but diverged in scale, because first-past-the-post rewards where votes fall, not just how many. A blended average hides all of it.

Press and forecast layer

The poll and market series were cross-read against five free public trackers, the same kind of sources AFOS audits daily for Brazil: the BBC poll tracker, Politico Poll of Polls (UK), The Guardian, YouGov (which published the campaign's most-watched MRP seat projection), and Ipsos. One result stands out for the AFOS thesis: the prediction market tracked the final seat outcome at least as closely as YouGov's closing MRP, with far less machinery.

Pollsters covered: YouGov, Savanta, Deltapoll, Survation, Opinium, More in Common, Redfield & Wilton, Techne, Ipsos, Norstat, BMG, JL Partners, We Think, Number Cruncher Politics, and others.

Provenance and method: poll figures compiled deterministically (rowspan/colspan-aware HTML parser) from the public Wikipedia aggregation "Opinion polling for the 2024 United Kingdom general election." Market odds from the public Polymarket market. Cross-checked against the BBC, Politico, Guardian, YouGov and Ipsos trackers. Nothing imputed or smoothed, missing values left blank.

License (dual): the data (CSV, JSON) are released under CC BY 4.0, the code (parse-uk-wiki.mjs, build-uk-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. United Kingdom 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 geral do Reino Unido de 2024 (Câmara dos Comuns, 04/jul/2024). Nível partido: as pesquisas medem voto por partido, o mercado precifica a probabilidade de vencer mais cadeiras (pluralidade FPTP). Duas grandezas diferentes, e a distância entre elas é o sinal.

Os Trabalhistas venceram, e o mercado já sabia a magnitude

O Labour de Keir Starmer levou 411 das 650 cadeiras. Na véspera, o mercado de previsão (volume de US$ 1,76 milhão) dava ao Labour 99% de chance de ter a maior bancada, enquanto as pesquisas mediam cerca de 40% de intenção de voto. Não é contradição: o mercado precifica quem vence, a pesquisa mede voto, e o sistema distrital britânico transformou 33,7% dos votos em 63% das cadeiras.

Resultado oficial: Labour 411 cadeiras (33,7% do voto) · Conservadores 121 (23,7%) · Liberais Democratas 72 (12,2%) · SNP 9 (2,5%) · Reform UK 5 (14,3%) · Verdes 4 (6,8%) · Plaid Cymru 4 (0,7%).

  • polls/uk-polls.csv: voto por partido, formato largo, 7 partidos, 293 pesquisas (jan a jul 2024).
  • data/uk-market-odds-timeseries.csv / uk-divergence-timeseries.csv: probabilidade Polymarket de "vencer mais cadeiras" por partido (volume total US$ 1,76 mi) e divergência mercado × pesquisa.

⚖️ Divergências em destaque

  • O landslide que o mercado já tinha precificado (Labour). O Labour liderou todas as pesquisas, cerca de 39 a 41% do voto, e o mercado lhe dava cerca de 99% de vencer mais cadeiras na véspera. Os dois concordavam na direção. A escala é onde se separam: o Labour venceu 411 das 650 cadeiras, cerca de 63% da Câmara, com 33,7% do voto. Probabilidade de vencer, voto e cadeiras são três números diferentes.
  • Reform UK: terceiro em votos, quase nada no mercado, e o mercado acertou. O Reform marcou cerca de 14 a 17% na campanha, terceiro no país, mas o mercado nunca lhe deu mais que cerca de 1% de vencer mais cadeiras. O resultado confirmou: 14,3% dos votos viraram apenas 5 cadeiras. O sinal entendeu a regra do jogo melhor que uma leitura direta das pesquisas.
  • Liberais Democratas contra Reform: o caso mais claro de cadeiras × votos. Os Lib Dems tiveram 12,2% do voto e 72 cadeiras, enquanto o Reform teve mais votos, 14,3%, e só 5 cadeiras. Voto concentrado geograficamente vira cadeira, voto espalhado não.

A leitura: o voto diz como o Reino Unido votou, o mercado disse quem ia comandar a Câmara. Em 2024 os dois convergiram no Labour na direção, mas divergiram na escala, porque o sistema distrital premia onde o voto cai, não quanto. Uma média esconde tudo isso.

Camada de imprensa: as séries foram cruzadas com cinco trackers públicos e gratuitos (BBC poll tracker, Politico Poll of Polls, The Guardian, YouGov e Ipsos), o mesmo tipo de fonte que a AFOS audita diariamente no Brasil. Detalhe a favor da tese: o mercado acompanhou o resultado em cadeiras tão de perto quanto o MRP final do YouGov.


Español

Dataset abierto que cruza encuestas × mercados de predicción para la elección general del Reino Unido de 2024 (Cámara de los Comunes, 04 jul 2024). Nivel partido: las encuestas miden voto por partido, el mercado valora la probabilidad de ganar más escaños (pluralidad FPTP).

Ganó el Laborismo, y el mercado ya conocía la magnitud

El Laborismo de Keir Starmer obtuvo 411 de 650 escaños. En la víspera, el mercado de predicción (volumen de US$ 1,76 millones) daba al Laborismo un 99% de probabilidad de lograr más escaños, mientras las encuestas medían cerca del 40% de intención de voto. No es contradicción: el mercado valora quién gana, la encuesta mide voto, y el sistema británico convirtió 33,7% de los votos en 63% de los escaños.

Resultado oficial: Laboristas 411 escaños (33,7%) · Conservadores 121 (23,7%) · Liberales Demócratas 72 (12,2%) · SNP 9 (2,5%) · Reform UK 5 (14,3%) · Verdes 4 (6,8%) · Plaid Cymru 4 (0,7%).

⚖️ Divergencias destacadas

  • El landslide que el mercado ya había valorado (Laboristas). El Laborismo lideró todas las encuestas, cerca de 39 a 41% del voto, y el mercado le daba cerca de 99% de ganar más escaños en la víspera. Coincidían en la dirección. La escala es donde se separan: ganó 411 de 650 escaños, cerca del 63% de la Cámara, con 33,7% del voto.
  • Reform UK: tercero en votos, casi nada en el mercado, y el mercado acertó. Reform marcó cerca de 14 a 17%, tercero en el país, pero el mercado nunca le dio más de cerca de 1% de ganar más escaños. El resultado confirmó: 14,3% de los votos fueron apenas 5 escaños.
  • Liberales Demócratas frente a Reform: los Lib Dems tuvieron 12,2% del voto y 72 escaños, Reform tuvo más votos, 14,3%, y solo 5 escaños. El voto concentrado gana escaños, el voto disperso no.

Fuente: agregación pública de Wikipedia, Polymarket, cruzadas con BBC, Politico, The Guardian, YouGov e Ipsos. 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 (YouGov, Savanta, Deltapoll, Opinium, Ipsos, …) · BBC poll tracker · Politico Poll of Polls · The Guardian · Wikipedia aggregation · Polymarket. Column definitions in DATA_DICTIONARY.md.

Downloads last month
48