I am happy to report that after much hackery over the last few months,
culminating in a 2 man 30 hour marathon at GovHack, Jeffery and I have
completed the implementation of the core of the new MyRepresentatives
API.
As our works is taking us increasingly away from just the
representatives, we've decided to split this API out as a standalone
entity (separate to any actual web stuff we do).
We've rebranded the standalone API as "geo2gov". There is a shiny new
Amazon EC2 server running the beta code at geo2gov.com.au.
I won't go into too much more detail now, I've got a 20 minute
speaking slot at the weekend hackathon here, and hopefully I can
capture a recording/video of that talk and post it for those who can't
be in Sydney.
The site should be running most of the time between now and the
hackfest, but note that the current deployment in Amazon is not
configured for hot updates, so as I tune and tweak I'll need to drop
the site for about half an hour each time I deploy a new release.
The browser-friendly version of the API is located at http://geo2gov.com.au/html
The pure JSON service is located at http://geo2gov.com.au/json
To make a call for a particular location (for example, a post code)
you can just do the following
http://geo2gov.com.au/json?location=2480
The location param will accept an address, post code, suburb name,
university or other notable place that Google's geocoder knows about,
or a raw "lat,long" location.
For now, I'm leaving the raw Geocoder output in the response for
debugging purposes.
Feedback more than welcome, and I hope to see you all at the hackathon
this weekend.
Adam Kennedy
Andrew
I did run into a funny result on my first try - searching for "Barry
Drive" gives me the geo2gov result for the ACT (where I intended) but
the geocoding output notes there's another Barry Drive in Queensland.
What's the best practice for API clients intended to be where there's
multiple geocoding hits (especially if the geocoding output is going
to disappear in the future)? If I get the full address for that QLD
location and run it through again, I get the right result but I think
it should probably give you all the geo2gov data on the first try
(there are only so many "Oxford Street"s in Australia)
Addresses in the ACT currently register as having the NSW Legislative
Council as applicable.
This is due to a bug in our MIF parser, the MIF/MID format doesn't
appear to correctly support inverse areas cut out of a larger area.
This primarily means that we don't support lakes, but unfortunately,
as the ACT is entirely surrounded by NSW, the area that describes the
ACT is not removed out of NSW.
I'm working on a fix to this problem, but you may continue to see the
ACT bug for a week or so.
Adam K