Algorithm | By The Left
To draw the bar chart displayed on the App
The number of tactical votes for a political party is added to the number of votes for that party. This operation is performed for all three parties and the results are compared to determine the winner.
An extreme example for demonstration purposes
Say in a particular constituency Labour have 400 votes and all of these voters are willing to lend their vote to either the Lib Dems or the Greens. In the same constituency, the Lib Dems have 350 votes and all of these voters are willing to lend their vote to the Greens but none of them is willing to lend their vote to Labour. Again in the same constituency, the Greens have 250 votes and none of these voters is willing to lend their vote to either Labour or the Lib Dems. There are 1000 votes in total and without tactical voting Labour win with 400 votes, the Lib Dems are second with 350 votes and the Greens come third with 250 votes. However, when tactical voting is used the positions are reversed: the Greens come first with 250 + 400(from Labour) + 350(from the Lib Dems) = 1000 votes, the Lib Dems come second with 350 + 400(from Labour) = 750 votes and Labour are in third place with 400 votes.
What happens when there is a tie
If two or even three of the parties tie in the number of votes cast, including tactical votes, then the first time this happens the winner for the constituency is allocated at random and remains the winner unless and until overtaken by another party.
