Closed mpadge closed 3 years ago
That commit gives this:
library (gtfsrouter)
packageVersion ("gtfsrouter")
#> [1] '0.0.4.155'
gtfs <- extract_gtfs("vbb.zip")
#> ▶ 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$transfers <- readRDS ("vbb-transfers.Rds")
gtfs <- gtfs_timetable(gtfs, day = "tuesday")
from <- "Berlin Hauptbahnhof"
start_time <- 8 * 3600
to <- "Berlin, Elsenstr."
gtfs_route (gtfs, from, to, start_time)
#> route_name trip_name stop_name
#> 1 S9 Flughafen BER Terminal 1-2 S+U Berlin Hauptbahnhof
#> 2 S9 Flughafen BER Terminal 1-2 S+U Friedrichstr. Bhf (Berlin)
#> 3 S9 Flughafen BER Terminal 1-2 S Hackescher Markt (Berlin)
#> 4 S9 Flughafen BER Terminal 1-2 S+U Alexanderplatz Bhf (Berlin)
#> 5 S9 Flughafen BER Terminal 1-2 S+U Jannowitzbrücke (Berlin)
#> 6 S9 Flughafen BER Terminal 1-2 S Ostbahnhof (Berlin)
#> 7 S9 Flughafen BER Terminal 1-2 S+U Warschauer Str. (Berlin)
#> 8 S9 Flughafen BER Terminal 1-2 S Treptower Park (Berlin)
#> 9 <NA> (transfer) Berlin, Elsenstr./S Treptower Park
#> arrival_time departure_time
#> 1 08:05:00 08:05:42
#> 2 08:07:36 08:08:24
#> 3 08:09:54 08:10:24
#> 4 08:11:36 08:12:24
#> 5 08:13:54 08:14:24
#> 6 08:16:06 08:17:24
#> 7 08:19:06 08:19:42
#> 8 08:22:12 08:23:12
#> 9 08:24:20 <NA>
Created on 2021-01-22 by the reprex package (v0.3.0)
So gives results like this:
Created on 2021-01-22 by the reprex package (v0.3.0)
The specified
to
station of "Berlin, Elsenstr." is then connected from Treptower Park by a transfer. These terminal transfer stages need to be appended to the route.