Geocode a dataset

Share:

Description

mutate_geocode geocodes a data frame and appends the new information to the data frame provided.

Usage

1
mutate_geocode(data, location, ...)

Arguments

data

a data frame

location

a character string specifying a location of interest (e.g. "Baylor University")

...

arguments to pass to geocode

Value

data with geocoded information appended as columns

Author(s)

David Kahle david.kahle@gmail.com

See Also

geocode

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
df <- data.frame(
  address = c("1600 Pennsylvania Avenue, Washington DC", "", "houston texas"),
  stringsAsFactors = FALSE
)

## Not run:  # Server response can be slow; this cuts down check time.
mutate_geocode(df, address)


library(dplyr)
df %>% mutate_geocode(address)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.