kjordahl/geopandas — pull request #39 by jwass (2013-10-16 04:54:49+00:00)
Title: Initial commit of geocoding functionality

Geocode a Series or list of strings and get back a GeoDataFrame with the
Point objects and a full geocoded address.

Uses `geopy` to geocode strings. This allows something like this:
```python
>>> from geopandas.geocode import geocode
>>> df = geocode(['cambridge, ma', '1600 pennsylvania avenue washington dc'])
address geometry
0 Cambridge, MA, USA POINT (-71.1097334999999902 42.3736158000000032)
1 1600 Pennsylvania Avenue Northwest, President'... POINT (-77.0365122999999983 38.8978377999999978)
```

For fun you can save the output of `df.to_json()` and upload to Github to quickly see a map:
![screen shot 2013-10-16 at 12 47 33 am](https://f.cloud.github.com/assets/1214350/1340040/273e0df4-361e-11e3-8be1-7bf58440ffe1.png)

I'm not sure if a `geocode` module at the top-level is the right place, but I didn't think it belonged in `io`.
There's also some questions about what to do when the geocoder returns no result or has errors, the whole thing will error out now. We could fill those rows with nan, or possibly add an error string column which will be nan for successes, but have the appropriate error when there are problems.

Also, I've only tested this using the GoogleV3 geocoder and OpenMapQuest.

Would like to hear what others think... I think this is a great complement to Pandas use-cases where you'd be extracting addresses out of some data.