Skip to content

Commit

Permalink
Updating to R5 7.2 - closes #401
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpsaraiva committed Oct 20, 2024
1 parent 4aa8d2b commit 64db9c9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions r-package/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# r5r 2.1.0 (dev)

**Breaking changes**

- r5r now uses the latest version of R5 V7.2. Closed [#401](https://github.com/ipeaGIT/r5r/issues/401)

**Minor changes**

- The `isochrone()` function has a new boolean parameter `polygon_output` that allows users to choose whether the output should be a polygon- or line-based isochrone. Closed [#382](https://github.com/ipeaGIT/r5r/issues/382)
Expand Down
28 changes: 28 additions & 0 deletions r-package/tests/tests_marcus/test_R5_7_2.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# increase Java memory
options(java.parameters = "-Xmx2G")
library(r5r)

# build transport network
data_path <- system.file("extdata/poa", package = "r5r")
r5r::download_r5(version = '7.2.0', force_update = TRUE)
r5r_core <- setup_r5(data_path, overwrite = TRUE)

# load origin/destination points
points <- read.csv(file.path(data_path, "poa_points_of_interest.csv"))

departure_datetime <- as.POSIXct(
"13-05-2019 14:00:00",
format = "%d-%m-%Y %H:%M:%S"
)

ettm <- expanded_travel_time_matrix(
r5r_core,
origins = points,
destinations = points,
mode = c("WALK", "TRANSIT"),
time_window = 20,
departure_datetime = departure_datetime,
max_trip_duration = 60
)

head(ettm)

0 comments on commit 64db9c9

Please sign in to comment.