A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ipeaGIT/r5r/issues/326 below:

Check if input date is covered in the GTFS feed · Issue #326 · ipeaGIT/r5r · GitHub

1) Briefly describe your problem and what output you expect Problem

Every now and then, a user opens a new issue saying that r5r doest not output results accounting for the transit network. Fast forward, we help the user realize they were using a departure date that is outside the GTFS calendar. This has been a common issue in r5py, so they are implementing a simple input check.

Output expected

If user routes with a transit mode, we could test whether the date falls inside the calendar of the GTFS feeds used to build the network. If the input date falls outside the calendar, the function should throw and error with an informative message.

To make this work, it would be ideal if we could extract the start and end dates information of the service calendar cooked into the network built with setup_r5(). Something like this:

start <- r5r_core$service.calendar.start_date

end <- r5r_core$service.calendar.end_date

And then we can use this info to check against the departure_datetime input. @mvpsaraiva , is it possible to expose the r5r_core$service.calendar to R ?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4