Closed viajerus closed 1 year ago
Am I missing something?
In this case, yes. But that makes this issue very easy to solve. No services depart from the stop you are using:
library (gtfsrouter)
packageVersion ("gtfsrouter")
#> [1] '0.0.5.146'
url <- "https://www.nvbw.de/fileadmin/user_upload/service/open_data/fahrplandaten_ohne_liniennetz/bwgesamt.zip"
td = tempdir()
filename = tempfile(tmpdir=td, fileext=".zip")
download.file(url, filename)
gtfs <- extract_gtfs (filename)
#> ▶ Unzipping GTFS archive✔ Unzipped GTFS archive
#> ▶ Extracting GTFS feed✔ Extracted GTFS feed
#> ▶ Converting stop times to seconds✔ Converted stop times to seconds
#> ▶ Converting transfer times to seconds✔ Converted transfer times to seconds
gtfs <- gtfs_timetable (gtfs, day = "Thursday")
from <- "de:08222:2569:0:RiW"
stop_number <- which (gtfs$stops$stop_id == from)
print (stop_number)
#> [1] 24789
So that stop is in the stops table, but ...
tt <- gtfs$timetable
tt [tt$departure_station == stop_number, ]
#> Empty data.table (0 rows and 5 cols): departure_station,arrival_station,departure_time,arrival_time,trip_id
Created on 2023-03-30 with reprex v2.0.2
... no services depart from there. And so you can't get any travel times.
Okay, interesting, maybe something isn't right with the dataset. Thank you!
Hello, I am trying to get the traveltimes for a station located in a very busy area (Mannheim, DE). Although I have selected a peak hour, I don't get any results at all (or error).
This is my reprex:
Created on 2023-03-30 with reprex v2.0.2.9000
I have also tried to build a timetable before calling gtfs_traveltimes(), but then I get the following error.
Created on 2023-03-30 with reprex v2.0.2.9000
Am I missing something?