View source: R/utils-helpers.R
| get_validation_report | R Documentation |
Extract validation report summary from feed/dataset results. The Mobility Database 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.
get_validation_report(data)
data |
A tibble from |
A tibble with validation summary information:
feed_id or dataset_id - Identifier
provider - Provider name (if available)
total_error - Number of validation errors
total_warning - Number of validation warnings
total_info - Number of informational notices
html_report - URL to full HTML validation report
json_report - URL to JSON validation report
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
# Create sample dataset data with validation_report
sample_datasets <- tibble::tibble(
id = "mdb-1-202501010000",
feed_id = "mdb-1",
validation_report = tibble::tibble(
total_error = 0L,
total_warning = 5L,
total_info = 10L,
unique_error_count = 0L,
unique_warning_count = 3L,
unique_info_count = 5L,
url_html = "https://example.com/report.html",
url_json = "https://example.com/report.json",
validated_at = "2025-01-01T00:00:00Z",
validator_version = "5.0.0"
)
)
# Extract validation report
get_validation_report(sample_datasets)
# With real API data:
bart_feeds <- feeds(provider = "Bay Area Rapid Transit", data_type = "gtfs")
datasets <- mobdb_datasets(bart_feeds$id[1])
validation <- get_validation_report(datasets)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.