
Extract latest dataset information from search results
Source:R/utils-helpers.R
mobdb_extract_datasets.RdHelper function to extract dataset details from search results. The search
endpoint includes a latest_dataset field with comprehensive information
about the most recent dataset, including validation results.
Arguments
- results
A tibble returned by
mobdb_search().
Value
A tibble with one row per feed, containing key dataset information:
id- Feed IDdataset_id- Latest dataset IDhosted_url- URL to download the latest validated datasetdownloaded_at- When the dataset was capturedhash- Dataset file hashservice_date_range_start- Start of service datesservice_date_range_end- End of service datestotal_error- Number of validation errors (if available)total_warning- Number of validation warnings (if available)Note: Report URLs (html_report, json_report) are only available when using
mobdb_datasets(), not from search results
See also
get_validation_report() to get full validation details with report URLs,
mobdb_search() to search for feeds,
mobdb_datasets() to get dataset information directly
Examples
if (FALSE) { # \dontrun{
# Search for feeds
results <- mobdb_search("transit")
# Get dataset info with validation status
datasets <- mobdb_extract_datasets(results)
# Filter for feeds with no errors
clean_feeds <- datasets |> filter(total_error == 0)
} # }