Apply a previously build geocoder to target data. This function will apply whatever unique variables exist in the geocoder. See gw_build_geocoder for options.

gw_geocode(.data, type, address, class, side = "right", geocoder, include_result = TRUE)

Arguments

.data

A target data set

type

Geocoder type; one of either "local", "city api", or "census".

address

Address variable in the target data set, which should contain the house number, street directionals, name, and suffix, and optionally unit types and numbers as well. Unit names should be replaced with # to match how gw_build_geocoder creates units.

class

Output class; one of either "sf" or "tibble".

side

One of either "right" or "left" indicating where the identifier variable should be placed in the

geocoder

Name of object containing a geocoder built with gw_build_geocoder

include_result

Logical scalar; if TRUE (default), a column describing how each observation was geocoded is included in the output.

Value

A copy of the target data with georeferenced data applied to it.

See also