You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the possibly spammy issues but I had a look at this package again today and I've just run into these. If I try to run the router on this test feed I get the following error.
gtfs<-gtfsrouter::extract_gtfs("routing.zip")
gtfs<-gtfsrouter::gtfs_timetable(gtfs)
#> Day not specified; extracting timetable for Fridaygtfsrouter::gtfs_route(gtfs, from="One", to="Four", start_time=7*3600)
#> Error in `[.data.table`(gtfs$trips, index, trip_headsign): j (the 2nd argument inside [...]) is a single symbol but column name 'trip_headsign' is not found. Perhaps you intended DT[, ..trip_headsign]. This difference to data.frame is deliberate and explained in FAQ 1.1.
@polettif don't apologise - this is really helping to make the package more robust, so much appreciated! That commit now yields this response:
gtfs<-gtfsrouter::extract_gtfs("/data/mega/code/repos/atfutures/gtfs-router/routing.zip")
gtfs<-gtfsrouter::gtfs_timetable(gtfs)
#> Day not specified; extracting timetable for Thursdaygtfsrouter::gtfs_route(gtfs, from="One", to="Four", start_time=7*3600)
#> route_name stop_name arrival_time departure_time#> 1 Line D One 07:17:00 07:17:00#> 2 Line D Three 07:23:00 07:23:00#> 3 Line B Three 07:28:00 07:29:00#> 4 Line B Four 07:37:00 07:37:00
The trip_name column simply does not appear when trips has no trip_headsign column. The fix is a bit hacky, and what I need to do is more systematically go through the entire GTFS specs and ensure every "Optional" table and field are appropriately handled when not present, and so -> #16
Sorry for the possibly spammy issues but I had a look at this package again today and I've just run into these. If I try to run the router on this test feed I get the following error.
Created on 2019-05-10 by the reprex package (v0.2.1)
It appears that gtfsrouter needs the optional trip_headsign column to work? Is there a way around that or should I simply add the column to the feed.
The text was updated successfully, but these errors were encountered: