Skip to content

v0.3.0

Compare
Choose a tag to compare
@marcusyoung marcusyoung released this 31 Jan 22:16
· 122 commits to master since this release

New features

  • Added option to request information about each of the legs in a returned
    transit itinerary. There is a new parameter available for otp_get_times() called
    includeLegs. If this is set to TRUE (default is FALSE) and detail is also set
    to TRUE and mode includes a transit mode, then the list returned by the
    function will contain a third dataframe called legs. This consists of a row for
    each leg of the trip. Information provided includes departureWait which is the
    length of time in minutes required to wait for the start of a leg.

  • Added support for time zones (#7). The OTP API returns itinerary start and end
    times as EPOCH values. otpr converts these to hh:mm:ss format using the as.POSIXct()
    function. Previously, a time zone argument was not provided to this function. As a
    result as.POSIXct() assumed the time zone to be the current time zone of the local
    system. When the local system time zone is the same as the time zone of the
    router's graph then there will be no confusion. However, if the time zone of the
    graph is different from the time zone of the local system then the start and end
    times will be expressed in the local system time zone and not the time zone of the
    graph. To address this the following changes have been made:

    • Added a tz argument to the otp_connect() function. By default this
      is set to the local system's time zone. If the router's graph is in a different
      time zone the user can specify it (for example, "Europe/Berlin").
    • The dataframe returned by otp_get_times() when the detail argument is set to
      TRUE now includes an additional 'time zone' column. This shows the time zone of
      the returned itinerary start and end times. This makes explicit what time zone
      these times are expressed in.