The Australian Electoral Commission have released the data for preference allocation and makes a good subject for a visualisation.
Using a PERL script I was able to group the ticket preferences into groups and then create a matrix in a format suitable for input to a d3js chord diagram.
Getting useful data is always a compromise. Some parties have multiple tickets (ie they split their preference flows in two or more tickets). Independents do not have parties, but work in a group. I grouped independents by using the highest preferenced candidate for that ticket. The coalition have more than one party, so I had to combine these under coalition.
To measure how highly a party was preferenced, I took the average position on the ballot for each member of the party and average these if there were more than one ticket. For some parties with split tickets this meant that they might end up without preferencing any party particularly highly.
Next was how to visualise the data. A chord diagram seemed the natural way to show how parties preference each other. The problem is that there is too much data to show every preference allocation (by definition every party preferences every other candidate). So I needed to draw the line on how much data to show. I arbitrarily decided that any party that averaged a position in the top 25% of the ballot order was highly preferenced by the other party.
The visualisation shows some interesting things. Whether there is a symmetrical or asymmetrical relationship between parties can easily be seen. Als,o the wider the party is around the circle, the more other parties preference it. The ALP and coalition have fairly narrow widths while the bullet train party and family first are relatively wide.
Of course preferences are a lot more complex than shown here. The order of preferences and how they flow once quotas are allocated can have a subtle and profound affect on the election outcome. If you are considering voting below the line Antony Green has some good advice.
My visualisation is available at http://peterneish.github.io/preferences/ and the code can be found on GitHub.
Leave a Reply