1

I'm trying to obtain a couple of weeks worth of historical train performance (delay) data on trains arriving at Central Station (id=600016...600024), Brisbane, Australia for research purposes. I found a package called gtfsway developed by SymbolixAU, and some brief code, but I don't know how to specify a date and the station id.

I'm new to GTFS and any help is appreciated.

library(gtfsway)
url <- "https://gtfsrt.api.translink.com.au/Feed/SEQ"

response <- httr::GET(url)

FeedMessage <- gtfs_realtime(response)

## the function gtfs_tripUpdates() extracts the 'trip_update' feed
lst <- gtfs_tripUpdates(FeedMessage)  
Zeus
  • 1,496
  • 2
  • 24
  • 53
  • This is beyond my abilities to deal with, but maybe this will help. If you try ```str(lst)```, you get details of the list structure. ```lst[[1]]$dt_trip_info``` includes ```start_date```, etc. – markhogue Aug 31 '19 at 02:28
  • Thanks, I can unpack the list of lists, but I can't query days in the past. Maybe this is not possible for the api. – Zeus Aug 31 '19 at 04:49
  • Have a look at the [transitfeeds](https://transitfeeds.com/p/translink) api for Brisbane. There's quite a lot of history. I also haven't been maintaining `gtfsway` for a long time, so you may not be able to rely on it. – SymbolixAU Aug 31 '19 at 06:54
  • also look at the [`gtfsr`](https://github.com/ropensci/gtfsr) package – SymbolixAU Aug 31 '19 at 06:57

0 Answers0