
Download Origin-Destination Cost Matrix Results
Source:R/utils-download-od-matrix.R
download_od_results.RdDownloads and unzips the result file produced by a completed origin-destination cost matrix geoprocessing job, reading each CSV output into a named list of data frames with snake_case column names.
Value
A named list of data frames, one per CSV output, with snake_case names derived from the output file names.
Examples
if (FALSE) { # \dontrun{
# This example is not executed since it requires a network connection
# to ArcGIS Online and a valid authentication token
library(sf)
library(arcgisutils)
set_arc_token(auth_user())
origins <- st_sfc(
st_point(c(-122.4194, 37.7749)),
st_point(c(-122.4313, 37.7793)),
crs = 4326
)
destinations <- st_sfc(
st_point(c(-122.4083, 37.7858)),
st_point(c(-122.4000, 37.7900)),
crs = 4326
)
job <- od_cost_matrix_job(origins, destinations)
job$start()
job$await()
download_od_results(job)
} # }