prepareAddress: Prepare a raw address by cleaning and validating

View source: R/prepare_address.R

prepareAddressR Documentation

Prepare a raw address by cleaning and validating

Description

Prepare a raw address by cleaning and validating

Usage

prepareAddress(userid, data, address_column = "Address", max_tries = 10L)

Arguments

userid

The userid given to you by USPS, see the Details for more

data

A data.frame or data.table with at least a column containing raw addresses

address_column

The name of the column containing the addresses

max_tries

The maximum iterations to attempt when geocoding, see the Details for more

Details

The geocode function seems to throw spurious 'OVER_QUERY_LIMIT' errors quite frequently so the 'cleanAddress' function has some basic handling of these errors, allowing a certain number of retries for those addresses that did not get geocoded. When an address is successfully geocoded it will not be retried.

If you do not have a 'userid' you should register at https://www.usps.com/business/web-tools-apis before trying to use this function.

See Also

validateAddress


McClellandLegge/addressr documentation built on June 8, 2022, 10:48 p.m.