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
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.
You can try the 'geocode' function in the dismo package.
geocode('03861')
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.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110308/0bf398b9/attachment.pl>
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:
Thanks everyone for your input. ?I'll give geocode() a try. Andrew On Tue, Mar 8, 2011 at 12:30 PM, Robert Hijmans <r.hijmans at gmail.com> wrote:
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.
You can try the 'geocode' function in the dismo package.
geocode('03861')
? ? 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.
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
? ? ? ?[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo