Description Usage Arguments Details Value Author(s) See Also Examples
Implements a lookup using the revised March 2013 Google Maps API to determine point coordinates for a given address.
1 | geoAddress(x)
|
x |
x is a list or data frame containing: id, address, city, state/province, postal & country. The id is simply an identifier field and the remaining address elements do not have to be universally populated. A concatenation of the vector elements occurs but the input specification is only rigid in that an id field and 4 elements are needed. |
The GoogleMaps API is interfaced by rendering an address via URL in the following format:
PATTERN: http://maps.googleapis.com/maps/api/geocode/xml?address=num+street+city+state+zip+country&sensor=false
The output is a web page containing the XML document with the data fields which are then ingested.
The returned value is a list containing the elements: id, address, latitude, longitude (point coordinates).
id |
User defined identifier. |
address |
Concatenated address data. |
latitude |
Point coordinate - latitude. |
longitude |
Point coordinate - longitude. |
Randall Shane, PhD
rshane@basexvi.com
1 2 | x <- c("001","1600 Pennsylvania Ave","Washington","DC","20006","US")
geoAddress(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.