
Get GTFS-Schedule validation report for feeds or datasets
Source:R/utils-helpers.R
get_validation_report.RdExtract validation report summary from feed/dataset results. MobilityData runs all GTFS Schedule feeds through the canonical GTFS validator, and this function surfaces that validation data to help assess feed quality before downloading.
Note: This function does not support GBFS validation reports at this time as GBFS validation reports are located at a different endpoint and have a different validation criteria.
Arguments
- data
A tibble from
feeds(),mobdb_datasets(), ormobdb_search().
Value
A tibble with validation summary information:
feed_idordataset_id- Identifierprovider- Provider name (if available)total_error- Number of validation errorstotal_warning- Number of validation warningstotal_info- Number of informational noticeshtml_report- URL to full HTML validation reportjson_report- URL to JSON validation report
See also
filter_by_validation() to filter by quality thresholds,
view_validation_report() to open full HTML/JSON reports in browser,
mobdb_datasets() to get dataset information with validation data,
mobdb_extract_datasets() to extract validation from search results
Examples
if (FALSE) { # \dontrun{
# Get validation report for feeds from search
bart_feeds <- feeds(provider = "Bay Area Rapid Transit")
datasets <- mobdb_datasets(bart_feeds$id[1])
validation <- get_validation_report(datasets)
print(validation)
# Check TransLink Vancouver's validation (has known warnings)
# Per TransLink's GTFS page "We pass our data through Google's Transit Feed
# Validator at the error level, but the data may have warnings left unfixed
# in order to conform to TransLink's business rules, such as duplicate stops
# with no distance between them."
vancouver <- feeds(provider = "TransLink", country_code = "CA", data_type = "gtfs")
vancouver_datasets <- mobdb_datasets(vancouver$id[1])
validation <- get_validation_report(vancouver_datasets)
# Shows: 100,076 errors, 14,322,543 warnings
} # }