Closed ichsan2895 closed 1 year ago
Here is it the file that has the problem BugSearch_Bogor_GTFS.zip
Hi @ichsan2895. Thanks for opening this issue and provided the a reproducible example with the data. It seems the GTFS has quite a few problems and I suspect some of these problems might be causing the issue reported.
On a quick inspection, I see for example that the trip AK-01
basically has one single stop, kb-gedong-sawah
. I'm not sure this is what is causing the reported problem but it certainly raises a red flag about other problems in the GTFS data.
It seems that {tidytransit}
's validation is not capturing this and other types of errors (heads of @polettif). For a more thorough validation of the GTFS data, I would suggest using gtfstools::validate_gtfs
. This function can take a few minutes for large GTFS feeds. Code example below.
library(gtfstools)
local_gtfs_path <- "./r5rv1-highway-gtfs-bogor/angkots-v2-gtfs.zip"
gtfs <- gtfstools::read_gtfs(local_gtfs_path)
head(gtfs$stop_times)
# download validator
gtfstools::download_validator(path = '.')
# validate gtfs
gtfstools::validate_gtfs(gtfs = local_gtfs_path,
validator_path = 'gtfs-validator-v4.0.0.jar',
output_path = './')
See the outpu report in html
.
Hello @rafapereirabr , thanks for pointing out the GTFS problem. Yes, the GTFS is not made by me, so I don't know the data quality.
Tidytransit
doesn't detect that problem too
But, the gtfs_validator
from mobility_data , detect the problem too.
The problem is same as you said, GTFS$stop_times$stop_sequence
doesn't properly adjusted
Now, the problem was solved (after I repaired the GTFS$stop_times$stop_sequence
) and thank you for helping me
It seems that
{tidytransit}
's validation is not capturing this and other types of errors (heads of @polettif). For a more thorough validation of the GTFS data, I would suggest usinggtfstools::validate_gtfs
. This function can take a few minutes for large GTFS feeds. Code example below.
Yes tidytransit's validator works on a very basic level, it mainly checks if any required files are missing and fields are in the right format. There's no check on internal consistency (e.g. are ids shared across tables or this example of inconsistens stop times). I'll have a look into gtfstools::validate_gtfs
though, maybe we should rename tidytransit's function to check_files_and_fields or something like that.
How to reproduce:
network_settings.json