gcode: 'gcode' Geocodes a dataframe of addresses using Google Maps...

Description Usage Arguments Details Value Examples

View source: R/gcode.R

Description

gcode Geocodes a dataframe of addresses using Google Maps API via ggmap

Usage

1
gcode(df, infile, components = FALSE)

Arguments

df

A single-column dataframe of addresses.

infile

The file name or path of the input csv. Used as the base to which reference coordinates are appended

components

Logical. Postal code is included if components = TRUE. Defaults to FALSE.

Details

The function takes a single-column dataframe of addresses. It then geocodes those addresses, returning a new dataframe with additional columns for latitude, longitude and full address. Postal code can also be included as a separate column.

Value

A dataframe object with initial address, lat, long and full address. Postal code may also be included.

Examples

1
2
3
4
5
6
## Not run: 
test_str <- head(test,3)

gcode(test_str, components = TRUE)

## End(Not run)

12mre1/geocodr documentation built on Oct. 30, 2019, 4:02 a.m.