Published January 7, 2022 | Version v0.5.1
Software Open

otpr: An API wrapper for OpenTripPlanner

  • 1. University of Southampton


otpr is an R package that provides a wrapper for the OpenTripPlanner (OTP) API. To use otpr you will need a running instance of OTP. The purpose of the package is to submit a query to the relevant OTP API resource, parse the OTP response and return useful R objects. The package is aimed at both new and expert users of OTP. The key parameters needed to query each supported API resource are provided as (or via) otpr function arguments. The argument values submitted by the user are comprehensively checked prior to submission to OTP to ensure that they are valid and make sense in combination, with feedback provided as appropriate. This makes the package ideal for new users of OTP (especially when used with the accompanying tutorial). Advanced users can provide any additional API parameters they wish via the extra.params argument. These parameters are passed directly to the OTP API without checks.

otpr currently supports the following OTP API resources:

  • PlannerResource - retrieve one or more trip itineraries between supplied origin and destination by the designated mode(s).
  • LIsochrone Resource (OTPv1 only) - generate isochrone maps (the area accessible from or to a point within specified time thresholds).
  • SurfaceResource (OTPv1 only) - create and evaluate travel time surfaces (extremely efficient one-to-many analysis and generation of accessibility measures)

This package will be useful to researchers and transport planners who want to use OTP to generate trip data for accessibility analysis or to derive variables for use in transportation models.


Files (140.3 MB)

Name Size Download all
140.3 MB Download

Additional details