Details of data format and sources

The web page here for each council gives a summary of results by ward and party, with links to the individual ward.

Each ward's page gives the names of those elected, and full details of the vote counting process. This is presented both through a table giving the vote distribution at each stage, and through figures. The latter make it easy to follow the transfers of votes, with blocks of votes coloured according to the party of first preference (there is also an option "view transfers" to look at where transfers from candidates go). And there's a link to a map of the ward.

Each ward's page also gives a link through which the full vote preference data file for the ward can be downloaded. This makes possible a wide variety of data analyses, including of voting patterns, and of the dependence of the results on the exact STV algorithm used: Scottish Council elections currently use the weighted inclusive Gregory (WIG) method. In this, a fixed quota sufficient to guarantee election is set. If any candidate reaches this quota the surplus proportion of their votes is transferred to other candidates still in contention according to their voters' next preferences. If after transfers of surpluses there are still seats to be filled, the candidate with least votes is excluded and all their votes transferred to their voters' next preferences. This continues until all seats are filled.

Example of a vote preference data file:

1 North West and Central Sutherland
3 7 585
Michael BAIRD,SLD
Charlotte GIBSON,Con
Marianne HUTCHISON,SNP
Robert Alan JARDINE,FA
Hugh MORRISON,Ind
Clive SOLEY,Lab
Philipp TANZER,SFP
1 1 5 3 2 4 6 7 0
1 1 3 4 5 7 6 2 0
1 2 7 1 0
32 3 1 5 0
...
1 7 5 1 2 6 4 3 0
0
The first two lines give the ward name, the number of candidates, number of seats, and the number of lines of vote data that follow,. There is then a line for each candidate, with party. There are then many, in this case 585, vote data lines, indicating how many voters opted for each order of preference. The first four and the last of these lines are shown here. For example, the first and fourth lines show (respectively) that one voter had preference order BAIRD, MORRISON, HUTCHISON, GIBSON, JARDINE, SOLEY, TANZER, while 32 voters had preference order HUTCHISON, BAIRD, MORRISON,, with no further preference.

[The 0s at the end of each line and on the final line are just "end of data" indicators.]

The ward page for this example is Highland/1_North_West_and_Central_Sutherland/index.html.

Data sources

The vote preference data files were copied from the versions officially published by the Returning Officers for each council. There are some variations in the way they have been presented on the 32 council web sites, and it is hoped that having them all in one place and in uniform format will make them more accessible to researchers and the public.

The versions here differ from official versions in two minor ways. First, to make them more user-friendly, the ward and candidate names have been moved from the end to the beginning of the file. Secondly, some information has been calculated - the number of vote data lines and the indicator of whether elected - or added (for previous elections, not yet for 2022) from other official election reports, namely the electorate, total number of votes cast, and the party affiliation of each candidate.

The complete data set, for all 355 wards in 32 councils, can be downloaded as a single zip file, SC2022_pref_format.zip of about 2 MB.

It is also available in ballot format, SC2022_ballot_format.zip, and as R data files SC2022_RData.zip - the latter also includes files describing the election result for each ward (who was elected, and the votes at each stage of the count).

Calculations

The calculations use my own WIG program, following the exact official rules, in particular truncating transfer values to 5 places of decimals. Results should therefore agree exactly with the offical results. This has been checked for a sample of wards; but please let me know if you do find any discrepancies.

There is one difference in calculations that should be mentioned. The official results in certain cases include an extra stage transferring the votes of the last excluded candidate; this is omitted here as unnecessary, since the result is at that point already decided.



Any corrections or comments will be welcome; please send to:   denismollison (at) gmail.com