# NOT RUN {
if (interactive()) {
library(r5r)
# build transport network
data_path <- system.file("extdata/spo", package = "r5r")
r5r_core <- setup_r5(data_path = data_path)
# load origin/destination points
points <- read.csv(file.path(data_path, "spo_hexgrid.csv"))[1:5,]
departure_datetime <- as.POSIXct("13-05-2019 14:00:00", format = "%d-%m-%Y %H:%M:%S")
# estimate travel time matrix
ttm <- travel_time_matrix(r5r_core,
origins = points,
destinations = points,
mode = c("WALK", "TRANSIT"),
departure_datetime = departure_datetime,
max_walk_dist = Inf,
max_trip_duration = 120L)
stop_r5(r5r_core)
}
# }
Run the code above in your browser using DataLab