boulderalf / BeeSafeEarth

Code in support of data and maps at http://beesafeboulder.com/
MIT License
1 stars 1 forks source link

Geocode test the current BeeSafeBoulder pledge addresses #1

Closed boulderalf closed 8 years ago

boulderalf commented 8 years ago

Background

Current BeeSafeBoulder pledge sheet has 1,400+ addresses. Users submitted pledges via a Google Form with free-form street address. Python script update_pledge_spreadsheet.py attempts to match the free-form street addresses against Boulder County Assessor parcel data.

Task

Create a Google Maps API geocoding test script that gets a standardized street address from each free-form address in the pledge spreadsheet.

Report back the success rate of Google Maps API Geocoding

ZebGirouard commented 8 years ago

First test of this functionality is done. High level results:

1) All code, input, and output, is in the GoogleMapsAPIWork folder.

2) Sanitizing these addresses is tough. Some respondents didn't even say "Street" or "Road" in the Google Form. Not sure how to fix this, but something to be aware of. There are places in the world where "Pine St" and "Pine Rd" intersect.

3) If we are counting "any non-specific address being placed somewhere in Boulder County" as accurate, then we have a 100% accuracy of the first 500 addresses in our list.

4) There are rate limits to this API. Per key, we can have 10 requests per second and 2500 per day. Not a huge issue, but we may have to throttle any big adds.

5) These addresses needed "Viewport Biasing", basically bounding a preferred region with a SW and NE corner. Selecting slightly outside the Boulder County borders on Google maps, I was able to get reasonable addresses. Without these borders, I got responses from Massachusetts to Ireland...all over the place. Seems like if we want to share this with other regions, they will want to input their own borders to bias GoogleMaps.

6) My next step is going to be creating a Google Map with all these points as pins. I'll also see if I can make those pins bees. Shouldn't be too hard, and then we'll have a viable end-to-end solution with Google.

ZebGirouard commented 8 years ago

This is definitely not what we're looking for, but was a fun hello-world for me using Google FusionTables and 100 sample Latitude Longitude pairs from my script:

http://zebgirouard.github.io/GoogleMapsAPI_Sandbox/beeMap.html

ZebGirouard commented 8 years ago

This one seems better, with a custom image, and more control over the JS and HTML if we want to tweak and/or share.

http://zebgirouard.github.io/GoogleMapsAPI_Sandbox/beeMapCustom.html

DaveLaskarzewski commented 8 years ago

Hey Zeb. Totally. Your Hello World version seemed more NSA like; smiling bees ... better!

Nice work.

I think somewhere along the road we should talk about potentially incorporating the new Bee Safe Earth logo as a pin; it's certainly open for discussion.

Anyway, really good stuff!

Dave

On Mar 24, 2016, at 10:34 PM, Timothy Zeb Girouard notifications@github.com wrote:

This one seems better, with a custom image, and more control over the JS and HTML if we want to tweak and/or share.

http://zebgirouard.github.io/GoogleMapsAPI_Sandbox/beeMapCustom.html

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

ZebGirouard commented 8 years ago

Yeah, for sure. Changing the pin to the real logo is as simple as uploading the image to GitHub and pointing to it. I think the main problems now are in #4 and #5 , basically how to scale up. Closing this, but feel free to re-open if you want to do something else with Geocoding.

DaveLaskarzewski commented 8 years ago

Love the 'do.

Re: pledge captains keeping data, sounds doable. I will talk to Kristin about designing an online data-entry sheet; or at least to start thinking about it.

It's interesting that nonprofits are using KML, like the City of London Timeline.

Thx Zeb.