home / psephology

elections

Data license: Open Parliament Licence · Data source: UK Parliament election results website

4 rows where constituency_group_id = 540

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: result_summary_id, polling_on (date), declaration_at (date), writ_issued_on (date)

id ▼ polling_on is_notional valid_vote_count invalid_vote_count majority declaration_at constituency_group_id general_election_id result_summary_id electorate_id parliament_period_id writ_issued_on
540 2015-05-07 0 48767 173 9177 2015-05-08T07:03:00 Stafford 540 2 2 2 2 540 540 56 56 2015-03-30
1190 2017-06-08 0 51924 122 7729 2017-06-09T03:14:00 Stafford 540 3 3 2 2 1189 1189 57 57 2017-05-03
1840 2019-12-12 0 51149 193 14377 2019-12-13T03:27:00 Stafford 540 4 4 2 2 1834 1834 58 58 2019-11-05
3140 2010-05-06 0 50239 84 5460 2010-05-07T02:43:00 Stafford 540 1 1 13 13 3139 3139 55 55 2010-04-12

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE "elections" (
   [id] INTEGER PRIMARY KEY,
   [polling_on] TEXT,
   [is_notional] INTEGER,
   [valid_vote_count] INTEGER,
   [invalid_vote_count] INTEGER,
   [majority] INTEGER,
   [declaration_at] TEXT,
   [constituency_group_id] INTEGER REFERENCES [constituency_groups]([id]),
   [general_election_id] INTEGER REFERENCES [general_elections]([id]),
   [result_summary_id] INTEGER REFERENCES [result_summaries]([id]),
   [electorate_id] INTEGER REFERENCES [electorates]([id]),
   [parliament_period_id] INTEGER REFERENCES [parliament_periods]([id]),
   [writ_issued_on] TEXT
);
CREATE INDEX [idx_elections_parliament_period_id]
    ON [elections] ([parliament_period_id]);
CREATE INDEX [idx_elections_electorate_id]
    ON [elections] ([electorate_id]);
CREATE INDEX [idx_elections_result_summary_id]
    ON [elections] ([result_summary_id]);
CREATE INDEX [idx_elections_general_election_id]
    ON [elections] ([general_election_id]);
CREATE INDEX [idx_elections_constituency_group_id]
    ON [elections] ([constituency_group_id]);
Powered by Datasette · Queries took 13.203ms · Data license: Open Parliament Licence · Data source: UK Parliament election results website