Python script for Australia under PR

MajorlyUnemployedGrad
1 min readOct 13, 2020

I recently wrote an article theorizing what Australian Parliament could look like under PR electoral systems. You can find it here:

This article just contains the (quite shabby) code used to obtain the results featured in the above article. For instance, since I had previously created the functions that assign seats given votes according the D’Hondt and Webster electoral systems, I used this code, which allows for different electoral thresholds. The rest of the script isn’t designed to accommodate non-0 thresholds so this feature is redundant.

The script also contains a function for quantifying disproportionality via the Loosemore-Hanby index. In the main article I only used the Gallagher index since it is a more popular measure and I wanted to keep it simple.

--

--