Giter Club home page Giter Club logo

opentripplanner's Introduction

OpenTripPlanner for R

R build status codecov Project Status: Active – The project has reached a stable, usable state and is being actively developed. 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.

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)

RcppSimdJson

From version 0.3.0 of opentripplanner the package RcppSimdJson is used for JSON parsing. This package is not supported on some older versions of R (<= 3.6) and some older Operating Systems. To meet CRAN requirements version 0.3.1 added a legacy mode for older versions of R. This legacy mode has reduced functionality and users on old systems may get better results using version 0.2.3 of the package. You can install older versions using remotes.

remotes::install_version("opentripplanner", "0.2.3")

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_isochrone() To get isochrone maps;
  3. otp_geocode() To get the locations of named places e.g. road names.

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

opentripplanner's People

Contributors

aakarner avatar danielskatz avatar dhersz avatar layik avatar marcusyoung avatar mem48 avatar robinlovelace avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.