All Projects → ipeaGIT → r5r

ipeaGIT / r5r

Licence: other
ipeagit.github.io/r5r/

Programming Languages

r
7636 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to r5r

go router
The purpose of the go_router for Flutter is to use declarative routes to reduce complexity, regardless of the platform you're targeting (mobile, web, desktop), handling deep linking from Android, iOS and the web while still allowing an easy-to-use developer experience.
Stars: ✭ 380 (+322.22%)
Mutual labels:  router, routing
routex.js
🔼 Alternative library to manage dynamic routes in Next.js
Stars: ✭ 38 (-57.78%)
Mutual labels:  router, routing
public-transit-tools
Tools for working with GTFS public transit data in ArcGIS
Stars: ✭ 126 (+40%)
Mutual labels:  gtfs, transport
gtfs-server
GTFS API Server, written in Rust
Stars: ✭ 13 (-85.56%)
Mutual labels:  gtfs, transport
STCRouter
基于标准URL的iOS路由系统,可实现业务模块组件化,控制器之间零耦合,可实现黑白名单控制,可进行native降级到hybrid。
Stars: ✭ 19 (-78.89%)
Mutual labels:  router, routing
european-transport-operators
NOT UP-TO-DATE ANYMORE, UNMAINTAINED. CHECK european-transport-feeds INSTEAD. List of european long-distance transport operators, available API endpoints, GTFS feeds and client modules.
Stars: ✭ 47 (-47.78%)
Mutual labels:  gtfs, transport
journey
A conductor routing helper library
Stars: ✭ 35 (-61.11%)
Mutual labels:  router, routing
Swiftuirouter
Routing in SwiftUI
Stars: ✭ 242 (+168.89%)
Mutual labels:  router, routing
RouteNow
RouteNow is a small fast library ⚡ that will help you in developing a SinglePage Application without any dependencies like jQuery, AngularJs, vue.js or any of those bulky frameworks.
Stars: ✭ 17 (-81.11%)
Mutual labels:  router, routing
neteng-roadmap
Network Engineering at Scale Roadmap/Landscape
Stars: ✭ 53 (-41.11%)
Mutual labels:  router, routing
transxchange2gtfs
tool to convert transxchange data into a GTFS feed
Stars: ✭ 26 (-71.11%)
Mutual labels:  gtfs, transport
CRRouter
A simple and powerful router
Stars: ✭ 54 (-40%)
Mutual labels:  router, routing
nepomuk
A public transit router for GTFS feeds (currently only static) written in modern c++
Stars: ✭ 22 (-75.56%)
Mutual labels:  routing, gtfs
GTFS
.NET implementation of a General Transit Feed Specification (GTFS) feed parser.
Stars: ✭ 55 (-38.89%)
Mutual labels:  routing, gtfs
Clevergo
👅 CleverGo is a lightweight, feature rich and high performance HTTP router for Go.
Stars: ✭ 246 (+173.33%)
Mutual labels:  router, routing
es6-router
🌐 Simple client side router built in ES6
Stars: ✭ 16 (-82.22%)
Mutual labels:  router, routing
Klein.php
A fast & flexible router
Stars: ✭ 2,622 (+2813.33%)
Mutual labels:  router, routing
Router
Router implementation for fasthttp
Stars: ✭ 234 (+160%)
Mutual labels:  router, routing
open-bus
🚌 Analysing Israel's public transport data
Stars: ✭ 65 (-27.78%)
Mutual labels:  gtfs, transport
router
Bidirectional Ring router. REST oriented. Rails inspired.
Stars: ✭ 78 (-13.33%)
Mutual labels:  router, routing

r5r: Rapid Realistic Routing with R5 in R logo

CRAN/METACRAN Version CRAN/METACRAN Total downloads R build status Codecov test coverage Lifecycle: experimental Publication

r5r is an R package for rapid realistic routing on multimodal transport networks (walk, bike, public transport and car). It provides a simple and friendly interface to R5, the Rapid Realistic Routing on Real-world and Reimagined networks, the routing engine developed independently by Conveyal.

r5r is a simple way to run R5 locally, what allows users to generate detailed routing analysis or calculate travel time matrices using seamless parallel computing. See a detailed demonstration of r5r in this intro Vignette. Over time, r5r migth be expanded to incorporate other functionalities from R5

This repository contains the R code (r-package folder) and the Java code (java-api folder) that provides the interface to R5. Soon, this could also become a python library.

Installation

You can install r5r:

# From CRAN
  install.packages("r5r")
  library(r5r)

# or use the development version with latest features
  utils::remove.packages('r5r')
  devtools::install_github("ipeaGIT/r5r", subdir = "r-package")
  library(r5r)

Please bear in mind that you need to have Java SE Development Kit 11 installed on your computer to use r5r. No worries, you don't have to pay for it. The jdk 11 is freely available from the options below:

If you don't know what version of Java you have installed on your computer, you can check it by running this on R console.

  rJava::.jinit()
  rJava::.jcall("java.lang.System", "S", "getProperty", "java.version")

Usage

The package has four fundamental functions.

  1. setup_r5

    • Downloads and stores locally an R5 Jar file (Jar file is downloaded only once)
    • Builds a multimodal transport network given a street network in .pbf format (mandatory) and one or more public transport networks in GTFS.zip format (optional).
  2. detailed_itineraries

    • Returns a data.frame sf LINESTRINGs with one or multiple alternative routes between one or multiple origin destination pairs. The data output brings detailed information on transport mode, travel time, walk distance etc for each trip section
  3. travel_time_matrix

    • Fast function that returns a simple 'data.frame' with travel time estimates between one or multiple origin destination pairs.
  4. accessibility

    • Fast computation of access to opportunities. The function returns a data.table with accessibility estimates for all origin points by transport mode given a selected decay function. Multiple decay functions are available, including step (cumulative opportunities), logistic, fixed Exponential and linear.

Demonstration on sample data

See a detailed demonstration of r5r in this intro Vignette. To illustrate functionality, the package includes a small sample data set of the public transport and Open Street Map networks of Porto Alegre (Brazil). Three steps are required to use r5r, as follows.

# allocate RAM memory to Java
options(java.parameters = "-Xmx2G")

# 1) build transport network, pointing to the path where OSM and GTFS data are stored
library(r5r)
path <- system.file("extdata/poa", package = "r5r")
r5r_core <- setup_r5(data_path = path, verbose = FALSE)

# 2) load origin/destination points and set arguments
points <- read.csv(system.file("extdata/poa/poa_hexgrid.csv", package = "r5r"))
mode <- c("WALK", "BUS")
max_walk_dist <- 3000   # meters
max_trip_duration <- 60 # minutes
departure_datetime <- as.POSIXct("13-05-2019 14:00:00",
                                 format = "%d-%m-%Y %H:%M:%S")

# 3.1) calculate a travel time matrix
ttm <- travel_time_matrix(r5r_core = r5r_core,
                          origins = points,
                          destinations = points,
                          mode = mode,
                          departure_datetime = departure_datetime,
                          max_walk_dist = max_walk_dist,
                          max_trip_duration = max_trip_duration)

# 3.2) or get detailed info on multiple alternative routes
det <- detailed_itineraries(r5r_core = r5r_core,
                            origins = points[370, ],
                            destinations = points[200, ],
                            mode = mode,
                            departure_datetime = departure_datetime,
                            max_walk_dist = max_walk_dist,
                            max_trip_duration = max_trip_duration,
                            shortest_path = FALSE)

# 4) Calculate number of schools accessible within 20 minutes 
access <- accessibility(r5r_core = r5r_core,
                        origins = points,
                        destinations = points,
                        opportunities_colname = "schools",
                        decay_function = "step",
                        cutoffs = 21,
                        mode =  c("WALK", "TRANSIT"),
                        verbose = FALSE)

Related R packages

There is a growing number of R packages with functionalities for transport routing, analysis and planning more broadly. Here are few of theses packages.

  • dodgr: Distances on Directed Graphs in R
  • gtfsrouter: R package for routing with GTFS data
  • hereR: an R interface to the HERE REST APIs
  • opentripplanner: OpenTripPlanner for R
  • stplanr: sustainable transport planning with R

The r5r package is particularly focused on fast multimodal transport routing. A key advantage of r5r is that is provides a simple and friendly R interface to R5, one of the fastest and most robust routing engines availabe.


Acknowledgement

The R5 routing engine is developed at Conveyal with contributions from several people.

Citation ipea

The R package r5r is developed by a team at the Institute for Applied Economic Research (Ipea), Brazil. If you use this package in research publications, we please cite it as:

  • Pereira, R. H. M., Saraiva, M., Herszenhut, D., Braga, C. K. V., & Conway, M. W. (2021). r5r: Rapid Realistic Routing on Multimodal Transport Networks with R5 in R. Findings, 21262. https://doi.org/10.32866/001c.21262

BibTeX:

@article{pereira_r5r_2021,
	title = {r5r: Rapid Realistic Routing on Multimodal Transport Networks with {R}$^{\textrm{5}}$ in R},
	shorttitle = {r5r},
	url = {https://findingspress.org/article/21262-r5r-rapid-realistic-routing-on-multimodal-transport-networks-with-r-5-in-r},
	doi = {10.32866/001c.21262},
	abstract = {Routing is a key step in transport planning and research. Nonetheless, researchers and practitioners often face challenges when performing this task due to long computation times and the cost of licensed software. R{\textasciicircum}5{\textasciicircum} is a multimodal transport network router that offers multiple routing features, such as calculating travel times over a time window and returning multiple itineraries for origin/destination pairs. This paper describes r5r, an open-source R package that leverages R{\textasciicircum}5{\textasciicircum} to efficiently compute travel time matrices and generate detailed itineraries between sets of origins and destinations at no expense using seamless parallel computing.},
	language = {en},
	urldate = {2021-03-04},
	journal = {Findings},
	author = {Pereira, Rafael H. M. and Saraiva, Marcus and Herszenhut, Daniel and Braga, Carlos Kaue Vieira and Conway, Matthew Wigginton},
	month = mar,
	year = {2021},
	note = {Publisher: Network Design Lab}
}

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].