get_validation_report: Get GTFS-Schedule validation report for feeds or datasets

View source: R/utils-helpers.R

get_validation_reportR Documentation

Get GTFS-Schedule validation report for feeds or datasets

Description

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.

Usage

get_validation_report(data)

Arguments

data

A tibble from feeds(), mobdb_datasets(), or mobdb_search().

Value

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

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

# 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)


mobdb documentation built on Aug. 29, 2026, 1:07 a.m.