census_geocoder_multi_batch: Function to geocode a large (data frame) of addresses in...

View source: R/resource-census-geocoder.R

census_geocoder_multi_batchR Documentation

Function to geocode a large (data frame) of addresses in street/city/state/zip format

Description

The data here must still be able to fit in memory easily, data duplication does occur.

Usage

census_geocoder_multi_batch(
  data,
  street = street,
  city = city,
  state = state,
  zip = zip,
  endpoint = census_geocoder_api_endpoint(),
  returntype = "locations",
  benchmark = purrr::flatten(purrr::keep(census_geocoder_api_benchmarks(),
    ~.x$isDefault)),
  vintage = purrr::flatten(purrr::keep(census_geocoder_api_vintage()$vintages,
    ~.x$isDefault)),
  cache_dir = workflow::build_dir("census-geocoder-cache"),
  batch_size = 100,
  lib_paths = .libPaths()
)

Arguments

street

bare symbol for street column

city

bare symbol for city column

state

bare symbol for state column

zip

bare symbol for zip code column

cache_dir

optional path to file to use to cache results to avoid submitting them multiple times. Can be shared between calls or it will be based on a hash of the batch input data.

batch_size

how many records should be sent to a worker at one time

batch

data frame containing columns with parts of the address

...

other arguments to the batch geocoder

Value

list of geocoded components and resulting tables with some simplified output


sakrejda/workflow documentation built on Nov. 18, 2024, 3:02 a.m.