Skip to contents

Submits a file of addresses to the BatchGeocode job endpoint.

Usage

geocode_file_job(
  path = NULL,
  field_mapping,
  ...,
  item_id = NULL,
  server_url = NULL,
  geocoder = default_geocoder(),
  token = arc_token()
)

geocode_file(
  path,
  field_mapping,
  out,
  ...,
  interval = 5,
  geocoder = default_geocoder(),
  token = arc_token()
)

Arguments

path

String. Path to a CSV of addresses to upload and geocode.

field_mapping

Named character vector mapping geocoder fields to columns in path, for example c(SingleLine = "full_address"). Case sensitive.

item_id

String. Id of a CSV already in the portal. Use instead of path.

server_url

String. Overrides the job URL derived from geocoder.

geocoder

default default_geocoder().

token

an object of class httr2_token as generated by auth_code() or related function

out

String. Where to write the result CSV.

interval

Number. Seconds between status checks.

Value

A BatchGeocodeJob.

Examples

if (FALSE) { # \dontrun{
job <- geocode_file_job("addresses.csv", c(SingleLine = "full_address"))
job$await()
write_geocode_result(job, "geocoded.csv")
} # }