Heatmap of votes by booth

Here’s another visualisation of some data from the 2013 Australian Federal Election.

I wanted to see how consistent voting patterns were across booths within an electorate. From handing out how to vote cards at my local polling booth I had the feeling that not every booth is the same.

Fortunately the Australian Electoral Commission publishes a live feed of all data by booth. Its the same data that the news outlets use, so its pretty good. It follows the Election Markup Language standard, so extracting the data was not too hard. The AEC had added in their own elements, but they used namespaces which made it fairly simple to process using a fairly basic perl script.

Data is based on first preferences only. Because of the way heatmaps work, if booths are closer together the intensity increases, so to some extent the heat map is determined by the layout of the booths. However, distinct patterns are discernible if you explore the data. Only parties that registered votes in at least 200 booths have been included.

Absentee voting at capital cities booths are mapped at the booth rather than in the electorate that the vote was for, so capital cities tend to show high results for every party.

You can see the live demo and the source code is at GitHub.

 

 


Posted

in

, ,

by

Comments

3 responses to “Heatmap of votes by booth”

  1. Yuri Zhylyuk avatar

    Hi Peter. I’ve come across this blog post while searching for examples of heatmaps and their implementations. I like your idea of combining heatmap layer with the markers – very neat! Is your code on GitHub free for a non-commercial reuse?

    1. peter avatar
      peter

      Thanks Yuri, glad you liked it. Yes, definitely feel free to use the code. I’ll have to add in an open source licence in there.

  2. […] of the JavaScript code is a copy of a great work done by Peter Neish for his Australian Election 2013 heat […]

Leave a Reply

Your email address will not be published. Required fields are marked *