General elections datasets
Measures
Each measure is one kind of value you can request, using its id.
| Measure | Unit | Combining areas |
|---|---|---|
General election valid votesgeneral-election-valid-votes | votes | Adds up |
General election turnoutgeneral-election-turnout | percent | Not combined |
General election votes for Alliance Partygeneral-election-apni-votes | votes | Adds up |
General election votes for Brexit Partygeneral-election-brx-votes | votes | Adds up |
General election votes for Conservativegeneral-election-con-votes | votes | Adds up |
General election votes for Democratic Unionist Partygeneral-election-dup-votes | votes | Adds up |
General election votes for Greengeneral-election-green-votes | votes | Adds up |
General election votes for Labourgeneral-election-lab-votes | votes | Adds up |
General election votes for Liberal Democratgeneral-election-ld-votes | votes | Adds up |
General election votes for Other candidatesgeneral-election-other-votes | votes | Adds up |
General election votes for Plaid Cymrugeneral-election-pc-votes | votes | Adds up |
General election votes for Reform UKgeneral-election-ruk-votes | votes | Adds up |
General election votes for Social Democratic and Labour Partygeneral-election-sdlp-votes | votes | Adds up |
General election votes for Sinn Féingeneral-election-sf-votes | votes | Adds up |
General election votes for Scottish National Partygeneral-election-snp-votes | votes | Adds up |
General election votes for UKIPgeneral-election-ukip-votes | votes | Adds up |
General election votes for Ulster Unionist Partygeneral-election-uup-votes | votes | Adds up |
General election vote share for Alliance Partygeneral-election-apni-vote-share | percent | Weighted average |
General election vote share for Brexit Partygeneral-election-brx-vote-share | percent | Weighted average |
General election vote share for Conservativegeneral-election-con-vote-share | percent | Weighted average |
General election vote share for Democratic Unionist Partygeneral-election-dup-vote-share | percent | Weighted average |
General election vote share for Greengeneral-election-green-vote-share | percent | Weighted average |
General election vote share for Labourgeneral-election-lab-vote-share | percent | Weighted average |
General election vote share for Liberal Democratgeneral-election-ld-vote-share | percent | Weighted average |
General election vote share for Other candidatesgeneral-election-other-vote-share | percent | Weighted average |
General election vote share for Plaid Cymrugeneral-election-pc-vote-share | percent | Weighted average |
General election vote share for Reform UKgeneral-election-ruk-vote-share | percent | Weighted average |
General election vote share for Social Democratic and Labour Partygeneral-election-sdlp-vote-share | percent | Weighted average |
General election vote share for Sinn Féingeneral-election-sf-vote-share | percent | Weighted average |
General election vote share for Scottish National Partygeneral-election-snp-vote-share | percent | Weighted average |
General election vote share for UKIPgeneral-election-ukip-vote-share | percent | Weighted average |
General election vote share for Ulster Unionist Partygeneral-election-uup-vote-share | percent | Weighted average |
General election winning partygeneral-election-winning-party | party | Not combined |
“Adds up” means you can total it over areas or convert it to other areas. See Measures and periods for why some can't be combined.
Areas and years
Request each of these with its geography and code year as geography and boundaryYear.
| Areas | Code year | Periods | Covers | Records |
|---|---|---|---|---|
| Westminster constituencies | 2019 | 2010 to 2019 | UK | 650 |
| Westminster constituencies | 2024 | 2024 | UK | 650 |
Things to know
- Valid ballot papers counted in each constituency. Invalid ballot papers are excluded, as in the source field.
- Turnout is a percentage of the electorate, so it does not add across areas. A combined turnout needs the summed electorate as its denominator.
- Votes for Alliance Party. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Brexit Party. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Conservative. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Democratic Unionist Party. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
Show 28 moreShow fewer
- Votes for Green. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Labour. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Liberal Democrat. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Other candidates. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Plaid Cymru. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Reform UK. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Social Democratic and Labour Party. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Sinn Féin. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Scottish National Party. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for UKIP. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Votes for Ulster Unionist Party. An area where the party did not stand is recorded as zero votes; this is a count, not a vote share.
- Alliance Party votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Brexit Party votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Conservative votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Democratic Unionist Party votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Green votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Labour votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Liberal Democrat votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Other candidates votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Plaid Cymru votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Reform UK votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Social Democratic and Labour Party votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Sinn Féin votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Scottish National Party votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- UKIP votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- Ulster Unionist Party votes divided by the source-published valid ballot papers. The percentage does not add across areas; the API combines it by summing party votes and valid ballots through this weight.
- The label records the party that won the source area. It is not a numeric score, and a group of areas can have a distribution of winners rather than one additive outcome.
- A winning-party label has no numeric order and cannot be summed, averaged, ranked or converted across areas.
Corrections and improvements
These reviewed changes apply to what the API serves for this data. The publisher's source files are not changed; when a code correction applies, the served record retains the publisher's code as sourceAreaCode.
| Change | What the API serves | Applies when |
|---|---|---|
| Opt-in canonical measure-unit presentation | On the explicit canonical request, each numeric value and any publisher-supplied interval bound is multiplied by the measure's declared scale; the response names the resulting unit and calculation. | GET /v1/data/{measure-id}?units=canonical |
curl "https://api.ukdataatlas.com/v1/corrections?measure=general-election-valid-votes"/correctionsList reviewed correctionsRequest it
Get the first page of general-election-valid-votes for westminster constituencies:
curl "https://api.ukdataatlas.com/v1/data/general-election-valid-votes?period=2019&geography=constituency&boundaryYear=2019&limit=5"Read the measure's full definition, including every period it's published for:
curl "https://api.ukdataatlas.com/v1/measures/general-election-valid-votes"/data/{measure-id}Get observationsget/data/{measure-id}/seriesGet a time seriesSource and licence
| Dataset | Publisher | Licence |
|---|---|---|
| General Election Results | House of Commons Library | Open Parliament Licence |
Using this data in something you publish? Get attribution text with measure=general-election-valid-votes returns the credit line to include.
Downloads
Download complete publisher-observation files instead of paging through the API. Each file has a stable hash and covers one measure, period set and source geography. Any reviewed served code correction is documented and retains its publisher code on the affected record. The source and licence information above applies to these files too; preserve the attribution and note any cleaning or reformatting when you redistribute one.
| Measure | Coverage | Records | Download |
|---|---|---|---|
General election vote share for Alliance Partygeneral-election-apni-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Alliance Partygeneral-election-apni-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Alliance Partygeneral-election-apni-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Alliance Partygeneral-election-apni-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Brexit Partygeneral-election-brx-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Brexit Partygeneral-election-brx-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Brexit Partygeneral-election-brx-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Brexit Partygeneral-election-brx-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Conservativegeneral-election-con-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Conservativegeneral-election-con-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Conservativegeneral-election-con-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Conservativegeneral-election-con-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Democratic Unionist Partygeneral-election-dup-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Democratic Unionist Partygeneral-election-dup-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Democratic Unionist Partygeneral-election-dup-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Democratic Unionist Partygeneral-election-dup-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Greengeneral-election-green-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Greengeneral-election-green-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Greengeneral-election-green-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Greengeneral-election-green-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Labourgeneral-election-lab-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Labourgeneral-election-lab-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Labourgeneral-election-lab-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Labourgeneral-election-lab-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Liberal Democratgeneral-election-ld-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Liberal Democratgeneral-election-ld-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Liberal Democratgeneral-election-ld-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Liberal Democratgeneral-election-ld-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Other candidatesgeneral-election-other-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Other candidatesgeneral-election-other-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Other candidatesgeneral-election-other-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Other candidatesgeneral-election-other-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Plaid Cymrugeneral-election-pc-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Plaid Cymrugeneral-election-pc-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Plaid Cymrugeneral-election-pc-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Plaid Cymrugeneral-election-pc-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Reform UKgeneral-election-ruk-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Reform UKgeneral-election-ruk-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Reform UKgeneral-election-ruk-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Reform UKgeneral-election-ruk-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Social Democratic and Labour Partygeneral-election-sdlp-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Social Democratic and Labour Partygeneral-election-sdlp-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Social Democratic and Labour Partygeneral-election-sdlp-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Social Democratic and Labour Partygeneral-election-sdlp-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Sinn Féingeneral-election-sf-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Sinn Féingeneral-election-sf-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Sinn Féingeneral-election-sf-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Sinn Féingeneral-election-sf-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Scottish National Partygeneral-election-snp-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Scottish National Partygeneral-election-snp-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Scottish National Partygeneral-election-snp-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Scottish National Partygeneral-election-snp-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election turnoutgeneral-election-turnout | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election turnoutgeneral-election-turnout | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for UKIPgeneral-election-ukip-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for UKIPgeneral-election-ukip-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for UKIPgeneral-election-ukip-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for UKIPgeneral-election-ukip-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election vote share for Ulster Unionist Partygeneral-election-uup-vote-share | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election vote share for Ulster Unionist Partygeneral-election-uup-vote-share | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election votes for Ulster Unionist Partygeneral-election-uup-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election votes for Ulster Unionist Partygeneral-election-uup-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election valid votesgeneral-election-valid-votes | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election valid votesgeneral-election-valid-votes | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |
General election winning partygeneral-election-winning-party | Westminster constituencies · 2010 to 2019 · code year 2019 | 2,600 | JSON |
General election winning partygeneral-election-winning-party | Westminster constituencies · 2024 · code year 2024 | 650 | JSON |