Skip to content

package to query Google for latitude and longitude for a given ZIP code

4 messages · Robert J. Hijmans, Andrew Yee, Guy Serbin

#
Hi, I was wondering if someone could direct me to a package that would
allow you to query Google (or any other resource) for the latitude and
longitude of a ZIP code.

While I'm aware of the zipcode package, there are certain ZIP codes
that are not in the database (e.g. areas that are serviced by PO
boxes, e.g. 03861).

I was thinking that Google could be helpful for retrieving this kind
of information and was hoping that there's a package that handles
these kinds of queries.

Thanks,
Andrew
#
You can try the 'geocode' function in the dismo package.
ID      lon      lat   lonmin    lonmax   latmin   latmax
[1,]  1 -71.0169 43.11589 -71.0731 -70.96072 43.08175 43.17245
Robert

--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/package-to-query-Google-for-latitude-and-longitude-for-a-given-ZIP-code-tp6130598p6131592.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
#
Hi,

The data you are looking for could likely come from www.geodata.gov

I am guessing this would be the same set that Google uses, but since
it's from the Federal Government you wouldn't be in violation of any
terms of service.

Best regards,
Guy
On Tue, Mar 8, 2011 at 1:26 PM, Andrew Yee <yee at post.harvard.edu> wrote: