v0.3.0
New features
-
Added option to request information about each of the legs in a returned
transit itinerary. There is a new parameter available forotp_get_times()
called
includeLegs
. If this is set to TRUE (default is FALSE) anddetail
is also set
to TRUE andmode
includes a transit mode, then the list returned by the
function will contain a third dataframe calledlegs
. This consists of a row for
each leg of the trip. Information provided includesdepartureWait
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 theas.POSIXct()
function. Previously, a time zone argument was not provided to this function. As a
resultas.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 theotp_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 thedetail
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.
- Added a