geocode_gmap: Tidy Geocoding with Google's API

View source: R/geocoding.R

geocode_gmapR Documentation

Tidy Geocoding with Google's API

Description

Tidy Geocoding with Google's API

Usage

geocode_gmap(data, var, api_key = NA, verbose = FALSE, wait_nicely = TRUE)

Arguments

data

A dataframe containing a column with addresses stored as characters.

var

A column with addresses stored as characters.

api_key

A valid API key for Google Cloud Services. See https://cloud.google.com/free/

verbose

Boolean flag controlling console updates. Defaults to FALSE.

wait_nicely

Boolean flag controlling API rate. Defaults to TRUE.

Value

The original dataframe with geocoded latitude and longitude in new columns lat and lng. Addresses that are invalid or not found return NA.


Ottawa-Neighbourhood-Study/onsr documentation built on June 19, 2022, 11:46 a.m.