Easiest way to look up zip code from full address or lat/long?

32 views
Skip to first unread message

Roxanne Johnson

unread,
Mar 9, 2016, 9:59:26 AM3/9/16
to Open Twin Cities
Hi everyone- I have a data set for which my records have a full address as well as a lat/long but for whatever reason a group of them are missing the zip code.
I can copy/paste the full address into google maps to get the zip one at a time, but I was wondering if there might be a way to use the map API or some kind of reverse geocoding to get all of these at once.
Also, the data is company addresses that aren't public.

Thanks!
-Roxanne 

rox johnson

unread,
Mar 9, 2016, 11:04:58 AM3/9/16
to Casey Helbling, Open Twin Cities
Thanks Casey- I don't have a ton of records with this problem (but more than 10, which is about where I'm motivated to find a way to do them in bulk) so I probably won't have throttling issues. Anyone know if there is anything in Python that might be similar? I haven't used Ruby.
Thanks!
-Roxanne

On Wed, Mar 9, 2016 at 9:41 AM, Casey Helbling <ca...@softwareforgood.com> wrote:

In Ruby this is a pretty common Gem to accomplish reverse geocoding.


Depending which service you choose as your backend provider you might see throttling/rate limited requests. 

Cheers-
Casey


--
Find Open Twin Cities at http://opentwincities.org
---
You received this message because you are subscribed to the Google Groups "Open Twin Cities" group.
To unsubscribe from this group and stop receiving emails from it, send an email to twin-cities-bri...@googlegroups.com.
To post to this group, send email to twin-citi...@googlegroups.com.
Visit this group at https://groups.google.com/group/twin-cities-brigade.
For more options, visit https://groups.google.com/d/optout.



--
Casey Helbling

Founder/CEO  ǁ  @softwareforgood ǁ  612-207-6622
11 4th St. NE, Suite 300, Minneapolis, MN 55413

Alan Palazzolo

unread,
Mar 9, 2016, 11:17:39 AM3/9/16
to rox johnson, Casey Helbling, Open Twin Cities
You can try:

I would suggest using the Google geocoder as its the most versatile and accurate, though its terms of use are a bit weird.

Mike Dolbow

unread,
Mar 10, 2016, 9:17:21 AM3/10/16
to Open Twin Cities
If you've already got the lat/long, then you might want to look them up against a service that includes the "Zip Code Tabulation Areas" (ZCTAs) of the US Census, which are the closest thing to a "polygon zip" you can get. (Zip codes themselves technically aren't areas. It's a long story.) Census has ArcGIS Server layers that includes these: https://tigerweb.geo.census.gov/arcgis/rest/services/Census2010/PUMA_TAD_TAZ_UGA_ZCTA/MapServer/2

More details on using the above: http://www.census.gov/data/developers/data-sets/TIGERweb-map-service.html

And there is a Census API for lookups. You might want to try their geocoder: http://www.census.gov/geo/maps-data/data/geocoder.html

If you're just in Minnesota, we've created a layer of MN ZCTAs that you can use in a GIS: https://gisdata.mn.gov/dataset/bdry-zip-code-tabulation-areas

Good luck!

rox johnson

unread,
Mar 10, 2016, 10:46:00 AM3/10/16
to Nelson, Wade (MNIT), Open Twin Cities
Thanks everyone! This is very helpful!
-Roxanne

On Thu, Mar 10, 2016 at 8:21 AM, Nelson, Wade (MNIT) <Wade....@state.mn.us> wrote:

USPS has an API for getting ZIP+4 based off an incomplete address:

 

https://www.usps.com/business/web-tools-apis/welcome.htm

 

 

Wade Nelson  |  Information Systems Division
MN.IT Services @ Revenue

651-556-6328  |  wade....@state.mn.us

cid:image001.jpg@01D17533.AF13B020

IT for Minnesota Government | mn.gov/mnit

--

Brad Neuhauser

unread,
Mar 10, 2016, 1:05:09 PM3/10/16
to Open Twin Cities, Wade....@state.mn.us
One more option: the USPS does have a Zip Code Lookup API (part of the Verify an Address group). Once you register, it appears to be free:

https://www.usps.com/business/web-tools-apis/welcome.htm


On Thursday, March 10, 2016 at 9:46:00 AM UTC-6, Roxanne Johnson wrote:
Thanks everyone! This is very helpful!
-Roxanne
On Thu, Mar 10, 2016 at 8:21 AM, Nelson, Wade (MNIT) <Wade....@state.mn.us> wrote:

USPS has an API for getting ZIP+4 based off an incomplete address:

 

https://www.usps.com/business/web-tools-apis/welcome.htm

 

 

Wade Nelson  |  Information Systems Division
MN.IT Services @ Revenue

651-556-6328  |  wade....@state.mn.us

cid:image001.jpg@01D17533.AF13B020

IT for Minnesota Government | mn.gov/mnit

 

 

From: twin-citi...@googlegroups.com [mailto:twin-citi...@googlegroups.com] On Behalf Of Roxanne Johnson
Sent: Wednesday, March 09, 2016 8:59 AM
To: Open Twin Cities <twin-citi...@googlegroups.com>
Subject: [open-twin-cities] Easiest way to look up zip code from full address or lat/long?

 

Hi everyone- I have a data set for which my records have a full address as well as a lat/long but for whatever reason a group of them are missing the zip code.

I can copy/paste the full address into google maps to get the zip one at a time, but I was wondering if there might be a way to use the map API or some kind of reverse geocoding to get all of these at once.

Also, the data is company addresses that aren't public.

 

Thanks!

-Roxanne 

--
Find Open Twin Cities at http://opentwincities.org
---
You received this message because you are subscribed to the Google Groups "Open Twin Cities" group.

To unsubscribe from this group and stop receiving emails from it, send an email to twin-cities-brigade+unsub...@googlegroups.com.

Nelson, Wade (MNIT)

unread,
Mar 10, 2016, 2:03:33 PM3/10/16
to Roxanne Johnson, Open Twin Cities

USPS has an API for getting ZIP+4 based off an incomplete address:

 

https://www.usps.com/business/web-tools-apis/welcome.htm

 

 

Wade Nelson  |  Information Systems Division
MN.IT Services @ Revenue

651-556-6328  |  wade....@state.mn.us

cid:image001.jpg@01D17533.AF13B020

IT for Minnesota Government | mn.gov/mnit

 

 

From: twin-citi...@googlegroups.com [mailto:twin-citi...@googlegroups.com] On Behalf Of Roxanne Johnson
Sent: Wednesday, March 09, 2016 8:59 AM
To: Open Twin Cities <twin-citi...@googlegroups.com>
Subject: [open-twin-cities] Easiest way to look up zip code from full address or lat/long?

 

Hi everyone- I have a data set for which my records have a full address as well as a lat/long but for whatever reason a group of them are missing the zip code.

--

Find Open Twin Cities at http://opentwincities.org
---
You received this message because you are subscribed to the Google Groups "Open Twin Cities" group.

To unsubscribe from this group and stop receiving emails from it, send an email to twin-cities-bri...@googlegroups.com.

Casey Helbling

unread,
Mar 10, 2016, 2:03:33 PM3/10/16
to Roxanne Johnson, Open Twin Cities

In Ruby this is a pretty common Gem to accomplish reverse geocoding.


Depending which service you choose as your backend provider you might see throttling/rate limited requests. 

Cheers-
Casey

On Wed, Mar 9, 2016 at 8:59 AM, Roxanne Johnson <rox.j...@gmail.com> wrote:

--
Find Open Twin Cities at http://opentwincities.org
---
You received this message because you are subscribed to the Google Groups "Open Twin Cities" group.
To unsubscribe from this group and stop receiving emails from it, send an email to twin-cities-bri...@googlegroups.com.
To post to this group, send email to twin-citi...@googlegroups.com.
Visit this group at https://groups.google.com/group/twin-cities-brigade.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages