Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

setup_r5

Create transport network used for routing in R5


Description

Combine data inputs in a directory to build a multimodal transport network used for routing in R5. The directory must contain at least one street network file (in .pbf format). One or more public transport data sets (in GTFS.zip format) are optional. If there is more than one GTFS file in the directory, both files will be merged. If there is already a 'network.dat' file in the directory the function will simply read it and load it to memory.

Usage

setup_r5(data_path, version = "6.2.0", verbose = TRUE, temp_dir = FALSE)

Arguments

data_path

character string, the directory where data inputs are stored and where the built network.dat will be saved.

version

character string, the version of R5 to be used. Defaults to latest version '6.2.0'.

verbose

logical, TRUE to show detailed output messages (Default) or FALSE to show only eventual ERROR and WARNING messages.

temp_dir

logical, whether the R5 Jar file should be saved in temporary directory. Defaults to FALSE

Value

An rJava object to connect with R5 routing engine

See Also

Other setup: download_r5()

Examples

if (interactive()) {

library(r5r)

# directory with street network and gtfs files
path <- system.file("extdata/poa", package = "r5r")

r5r_core <- setup_r5(data_path = path, temp_dir = TRUE)

}

r5r

Rapid Realistic Routing with 'R5'

v0.4.0
MIT + file LICENSE
Authors
Marcus Saraiva [aut] (<https://orcid.org/0000-0001-6218-2338>), Rafael H. M. Pereira [aut, cre] (<https://orcid.org/0000-0003-2125-7465>), Daniel Herszenhut [aut] (<https://orcid.org/0000-0001-8066-1105>), Carlos Kaue Vieira Braga [aut] (<https://orcid.org/0000-0002-6104-7297>), Matthew Wigginton Conway [aut] (<https://orcid.org/0000-0002-1210-2982>), Ipea - Institue for Applied Economic Research [cph, fnd]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.