MyNixOS website logo
Description

Setup and connect to 'OpenTripPlanner'.

Setup and connect to 'OpenTripPlanner' (OTP) <http://www.opentripplanner.org/>. OTP is an open source platform for multi-modal and multi-agency journey planning written in 'Java'. The package allows you to manage a local version or connect to remote OTP server to find walking, cycling, driving, or transit routes. This package has been peer-reviewed by rOpenSci (v. 0.2.0.0).

OpenTripPlanner for R

R buildstatus codecov Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. DOI status CRAN_Status_Badge

opentripplanner is an R package that provides a simple yet flexible interface to OpenTripPlanner (OTP). OTP is a multimodal trip planning service written in Java. For more information on what OTP is, see the prerequisites vignette.

opentripplanner can be used to interface with a remote instance of OTP (e.g. a website) or help you set up and manage a local version of OTP for private use. Basic setup and routing functions are outlined in the getting started vignette, while advanced functionality such as batch routing, isochrones, and customised setup is described in the advanced features vignette.

What’s New

The newest version of the package 0.5.0 (Jan 2023) focuses on increased routing speeds (3-4x faster) and expanding support for OTP v2.2. The new version also drops legacy support for R 3.6, and so now requires R 4.0 or later. See news for more details.

Installation

OpenTripPlanner

To use OpenTripPlanner on your local computer you will need to install Java 8 and download the latest version of OTP. Instructions on installing Java and setting up OTP can be found in the prerequisites vignette.

R Package

To install the stable CRAN version:

install.packages("opentripplanner") # Install Package
library(opentripplanner)            # Load Package

Install the development version using remotes:

# If you do not already have the remotes package
install.packages("remotes")
# Install the package from GitHub
remotes::install_github("ropensci/opentripplanner")
# Load the package
library(opentripplanner)

Usage

The package contains three groups of functions:

Functions for setting up a local instance of OTP:

  1. otp_dl_jar() To download the OTP Jar file;
  2. otp_dl_demo() To download the demo data for the Isle of Wight;
  3. otp_check_java() To check you have the correct version of Java;
  4. otp_build_graph() To make a OTP graph from raw data;
  5. otp_setup() To start up a local instance of OTP;
  6. otp_make_config() To make a config object;
  7. otp_validate_config() To validate a config object;
  8. otp_write_config() To save a config object as a json file.

Functions for connecting to a local or remote instance of OTP:

  1. otp_connect() To connect to OTP.

Functions for retrieving data from OTP:

  1. otp_plan() To get routes from A to B;
  2. otp_geocode() To get the locations of named places e.g. road names (OTP 1.x only);
  3. otp_isochrone() To get isochrone maps (OTP 1.x only);
  4. otp_make_surface() To make an analyst surface (OTP 1.x only);
  5. otp_surface() To evaluate a analyst surface (OTP 1.x only);
  6. otp_traveltime() To make a travel time matrix (OTP 1.x only);
  7. otp_surface_isochrone() To make a raster isochrone map (OTP 1.x only);

Results are returned as sf objects.

Acknowledgement

This package was built off the tutorial by Marcus Young.

Contribution

Please note that the opentripplanner project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms. Bug reports and comments are welcome as Github Issues and code submissions as Pull Requests.

Citation

Please cite the JOSS paper in publications:

Morgan et al., (2019). OpenTripPlanner for R. Journal of Open Source Software, 4(44), 1926, https://doi.org/10.21105/joss.01926

ropensci_footer

Metadata

Version

0.5.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows