Filter a GTFS data read using gtfs2gps::read_gtfs(). It removes stop_times whose arrival_time or departure_time is missing or is not a well-formed "H:MM:SS" time string (hours may exceed 24). It also filters stops and routes accordingly. The input data is not modified.
Examples
poa <- read_gtfs(system.file("extdata/poa.zip", package = "gtfs2gps"))
#> Unzipped the following files to /tmp/Rtmppl8S8P/gtfsio:
#> * agency.txt
#> * calendar.txt
#> * routes.txt
#> * shapes.txt
#> * stop_times.txt
#> * stops.txt
#> * trips.txt
#> Reading agency
#> Reading calendar
#> Reading routes
#> Reading shapes
#> Reading stop_times
#> Reading stops
#> Reading trips
subset <- filter_valid_stop_times(poa)
