This is a small script to generate a CSV file of all Australian postcodes and their respective electorates. It relies on the OpenAustralia API (https://www.openaustralia.org.au/api/docs/getDivisions)
- Get an OpenAustralia API key at (https://www.openaustralia.org.au/api/key)
- type git clone https://github.com/ToolsForRadicals/postcode_to_electorate.git at your command line
- type pip install -r requirements.txt
- Open postcode_to_electorate.py in your favorite text editor
- Replace "YOUR OPENAUSTRALIA API KEY GOES HERE" with your OpenAustralia API key from (https://www.openaustralia.org.au/api/key)
- Save.
- type python postcode_to_electorate.py
You should end up with a file called postcode_to_electorate.csv (Could take 5-10 minutes depending on your Internet connection speed)