A complete set of historical federal electorate boundaries

The boundaries of electorates change over time through redistribution, so they have both a historical and spatial dimension. I’ve never been able to track down a complete set of historical federal electorate boundaries. Perhaps it’s out there somewhere and I’ve just been looking in the wrong places.

However, as I noted in a previous post, I’ve been poking around in the Parliamentary Handbook recently, and noticed that its electorate pages include an option to view maps of the boundaries as they changed over time through redistribution – all the historical versions seemed to be in there!

Map of the electorate of Balaclava in the Parliamentary Handbook showing the dropdown list of dates to select a particular redistribution

I started to play around with the API and found you could get a list of identifiers and dates for each boundary change by using the electorate name and state, for example here’s Balaclava:

https://handbookapi.aph.gov.au/api/ElectorateMaps/ElectorateMaps?electorate=Balaclava&state=Victoria.

Using the identifiers in this JSON response, you can request specific maps like this:

https://handbookapi.aph.gov.au/api/ElectorateMaps/ElectorateMap?id=12004.

The map request returns a big block of encoded data. After running it through decodify, I realised it was base64 encoded. Decoding the data revealed the boundaries in KML format. Yay!

I looped through all the electorates and boundaries saving all of the individual KML files. I then used kml2geojson to convert the KML files to GeoJSON format. The description field in the KML files include some useful structured data in a HTML table, so I parsed the HTML and saved the values as individual properties attached to each GeoJSON Feature.

I’ve uploaded all the KML and GeoJSON files to a GitHub repository. I’ve also created a CSV index to the map files that contains the following fields:

  • electorate – electorate name
  • state – state in which the electorate is located
  • map_id – map identifier from Handbook
  • start_date – date this boundary came into effect
  • end_date – date this boundary was superceded
  • geojson_file – GeoJson file name

Hopefully, this will make it easier for people to find and use federal electoral boundaries.

According to its copyright page, content on the Parliament of Australia website is provided under a CC-BY-NC-ND licence.