I am trying to understand how google_distance works for a single pair of origin/destination coordinates before writing a loop to run around 1200 calculations. My first attempt worked but I need to run calculations based on an arrival time. I tried to run the query directly with the Google API and it appears to be something about specific time in the past. Google maps will not give calculations for that period either. Jumping to the Google API help area for some specifics
First Attempt:
google_distance(origins = c(39.96877,-75.19973), destinations = c(39.96345,-75.16573), mode = "transit")
Adding the arrival_time parameter resulted in "ZERO_RESULTS" which should not be true.
google_distance(origins = c(39.96877,-75.19973), destinations = c(39.96345,-75.16573), mode = "transit", arrival_time = time)
returned
$destination_addresses
[1] "39.96345,-75.16573"
$origin_addresses
[1] "39.96877,-75.19973"
$rows
elements
1 ZERO_RESULTS
$status
[1] "OK"
where
time = c(1540383240)
class(time) = c('POSIXct')
I know that there is a transit path available during the specified time so I'm not sure what has happened.