NYC Geoclient REST API from Python

Sat 01 March 2014

Recently, on the betaNYC Meetup email list, John Krauss and Tom Swanson both posted Python code for accessing the NYC Geoclient REST API, which is an awesome resource developed by the NYC Department of Information Technology and Telecommunications GIS/Mapping unit.

The Geoclient API is a RESTful web service interface to the NYC Department of City Planning’s Geosupport system developed by the Department of Information Technology and Telecommunications GIS/Mapping unit. Geosupport is a mainframe-based geocoding system used by NYC government. Geosupport provides coordinate and geographic attributes for supported input locations (address, intersection, blockface). Geoclient exposes the most widely used Geosupport functions and provides them in a more intuitive and modern manner.

This is what John has to say about his code:

I’ve been messing around with NYC’s geoclient API. It’s quite powerful! I wrapped the REST calls in a Python module, which is accessible for all on PyPI. You can check it out here:

https://github.com/talos/nyc-geoclient

And the documentation here:

http://nyc-geoclient.readthedocs.org/en/latest/index.html

On a side-note, according to Geoclient, almost 20% of the intersections in the city’s own collision statistics releases are ambiguous or invalid.

And this is what Tom has to say about his:

My code is nowhere near as clean as John’s but if might be of interest that I ran ~3millions records through the NYC GeoClient in December. Overall, the services worked great and was able to make ~1,500 calls per min. I was geocoding the parking ticket data on nyc open data.

https://github.com/tswanson/NYCParkingGeocode

In addition to the above two Python implementations, Edgar Gonzalez also recently released a ruby gem for the NYC GeoClient API:

Github: http://github.com/edgar/NYCGeoClient
Rubygems: http://rubygems.org/gems/nyc_geo_client

Note that you need to register an app with DoITT (and sign it up for the Geoclient API) then wait a few days before being able to use the API. So get registered ASAP!

Python

Announcement Python Geocoding

twitter

recent visitors