Giter VIP home page Giter VIP logo

proportional-past-the-post's Introduction

Simulation of the 2024 UK General Election using three voting systems: First Past the Post (FPTP, current), Proportional Representation (PR) and a new method known as Proportional Past the Post (PPP).

YouTube channel all about Proportional Past the Post: Proportional Past the Post

Analysis available in file election_2024.ipynb.

Election Data

Data for the 2024 UK General Election was obtained from the House of Commons Library, using the 'General election results by candidate' file.

The votes for each party were as follows:

2024 UK General Election Results

The analysis was also performed with the 2019 results. The figures are visible in the figures folder.

Methodology Notes

  • All "independent" candidates are lumped into a party called "Independent", and the algorithm is run as if this is a single party. The choice of whether or not to do this is important and the results change depending on it. I am not sure if this is how it is done in reality.
  • At the end of the algorithm, the votes and seats for "Labour and Cooperative party" and "Labour party" are added and reported under "Labour party".

Voting Systems

Using the above data, the results of the 2024 UK General Election were simulated using three voting systems. 'First Past the Post' (FPTP) is the method used today in the UK, in which the leading candidate in each constituency is allocated a seat. A competitor to FPTP is 'Proportional Representation' (PR), which allocates seats based on the proportion of votes each party received. This has the disadvantage of not taking into account the constituency data and often leads to hung parliaments, but is fundamentally highly democratic. A new method has been developed known as 'Proportional Past the Post' (PPP), which is a hybrid of FPTP and PR.

The results under each system are as follows:

2024 UK General Election Results

It is observed that the proportional systems lead to a greater diversity of parties in Parliament. The 'deviations from proportionality' are shown below:

2024 UK General Election Results

The breakdowns by each party are shown. Positive deviations represent over-representation, while negative deviations represent under-representation:

2024 UK General Election Results

The PPP system retains the benefits of good proportionality like PR, while also maintaining the constituency link of FPTP.

proportional-past-the-post's People

Contributors

lorcan2440 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.