geocode_ottawa: Tidy Geocoding with the City of Ottawa's API

View source: R/geocoding.R

geocode_ottawaR Documentation

Tidy Geocoding with the City of Ottawa's API

Description

Geocode a column of addresses using the City of Ottawa's geocoding service. No API key is needed, and the service uses ESRI's technology under the hood. Consult the City of Ottawa's developer resources or ESRI's API documentation for more information.

If you're getting timeouts or other server errors with big requests (more than 500 or 1000 records), try adjusting the batch size down.

Usage

geocode_ottawa(data, var, batch_size = 9999, verbose = FALSE, polite_pause = 1)

Arguments

data

A dataframe containing a column with addresses stored as characters.

var

A column with addresses stored as characters.

batch_size

Number of records to process in a batch. Defaults to 9999.

verbose

Boolean flag controlling console updates. Defaults to FALSE.

polite_pause

Number of seconds to pause between batches, if applicable. Defaults to 1.

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.