geoloc: Google Geolocation API Call

Description Usage Arguments Details Value Note Author(s) References Examples

Description

A function to perform the Google Geolocation API call, and return the longitude and latitude coordinates of the query location.

Usage

1
geoloc(address, apikey)

Arguments

address

query address (string). Do not use commas, and zip codes are not required, e.g. "1600 Pennsylvania Ave Washington DC".

apikey

your Google API key (string)

Details

Use of this function requires a Google API key, which is different from the Walk Score API key. Get one here: http://code.google.com/apis/maps/signup.html

Value

Returns an object of class GoogleGeoloc, basically a list of the following elements:

coordinates

A vector of two numbers, the first representing the longitude and the second representing the latitude.

accuracy

Accuracy rating of geolocation.

city

City containing the requested address

state

State containing the requested address

country

Country containing the requested address

Note

For description of Google Geolocation see here: http://code.google.com/apis/gears/api_geolocation.html

Author(s)

John Whalen

References

http://code.google.com/apis/gears/api_geolocation.html

Examples

1
2
3
4
## Not run: 
geoloc("350 5th Avenue New York NY","your Google API key")

## End(Not run)

walkscoreAPI documentation built on May 2, 2019, 3:41 p.m.