geoAddress: geoAddress

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/geoAddress.R

Description

Implements a lookup using the revised March 2013 Google Maps API to determine point coordinates for a given address.

Usage

1

Arguments

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.

Details

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.

Value

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.

Author(s)

Randall Shane, PhD
rshane@basexvi.com

See Also

addrListLookup, geoPlot

Examples

1
2
x <- c("001","1600 Pennsylvania Ave","Washington","DC","20006","US")
geoAddress(x)

RandallShanePhD/geoPlot documentation built on May 18, 2019, 1:34 p.m.