- Notifications
You must be signed in to change notification settings - Fork21
An R package to set up and use OpenTripPlanner (OTP) as a local or remote multimodal trip planner.
License
ropensci/opentripplanner
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
opentripplanner is an R package that provides a simple yet flexibleinterface toOpenTripPlanner (OTP).OTP is a multimodal trip planning service written in Java. For moreinformation on what OTP is, see theprerequisitesvignette.
opentripplanner can be used to interface with a remote instance ofOTP (e.g. a website) or help you set up and manage a local version ofOTP for private use. Basic setup and routing functions are outlined inthegetting startedvignette,while advanced functionality such as batch routing, isochrones, andcustomised setup is described in theadvanced featuresvignette.
The newest version of the package 0.5.0 (Jan 2023) focuses on increasedrouting speeds (3-4x faster) and expanding support for OTP v2.2. The newversion also drops legacy support for R 3.6, and so now requires R 4.0or later. Seenews formore details.
To use OpenTripPlanner on your local computer you will need to installJava 8 and download the latest version of OTP. Instructions oninstalling Java and setting up OTP can be found in theprerequisitesvignette.
To install the stable CRAN version:
install.packages("opentripplanner")# Install Packagelibrary(opentripplanner)# Load Package
Install the development version usingremotes:
# If you do not already have the remotes packageinstall.packages("remotes")# Install the package from GitHubremotes::install_github("ropensci/opentripplanner")# Load the packagelibrary(opentripplanner)
The package contains three groups of functions:
Functions for setting up a local instance of OTP:
otp_dl_jar()
To download the OTP Jar file;otp_dl_demo()
To download the demo data for the Isle of Wight;otp_check_java()
To check you have the correct version of Java;otp_build_graph()
To make a OTP graph from raw data;otp_setup()
To start up a local instance of OTP;otp_make_config()
To make a config object;otp_validate_config()
To validate a config object;otp_write_config()
To save a config object as a json file.
Functions for connecting to a local or remote instance of OTP:
otp_connect()
To connect to OTP.
Functions for retrieving data from OTP:
otp_plan()
To get routes from A to B;otp_geocode()
To get the locations of named places e.g. road names(OTP 1.x only);otp_isochrone()
To get isochrone maps (OTP 1.x only);otp_make_surface()
To make an analyst surface (OTP 1.x only);otp_surface()
To evaluate a analyst surface (OTP 1.x only);otp_traveltime()
To make a travel time matrix (OTP 1.x only);otp_surface_isochrone()
To make a raster isochrone map (OTP 1.xonly);
Results are returned assfobjects.
This package was built off thetutorial by MarcusYoung.
Please note that theopentripplanner
project is released with aContributor Code ofConduct.By contributing to this project, you agree to abide by its terms. Bugreports and comments are welcome as GithubIssues and codesubmissions asPullRequests.
Please cite the JOSS paper in publications:
Morgan et al., (2019). OpenTripPlanner for R. Journal of Open SourceSoftware, 4(44), 1926,https://doi.org/10.21105/joss.01926
About
An R package to set up and use OpenTripPlanner (OTP) as a local or remote multimodal trip planner.