
Read GTFS feed directly from Mobility Database
Source:R/integration-tidytransit.R
mobdb_read_gtfs.RdNote: This function is superseded by download_feed(), which provides
the same functionality plus integrated search, Flex filtering, and more control
over data sources. New code should use download_feed() instead.
Convenience wrapper that fetches a feed's download URL from the Mobility
Database and passes it to tidytransit::read_gtfs(). Requires the tidytransit
package.
Arguments
- feed_id
A string. The unique identifier for the feed, or a data frame with a single row from
feeds()ormobdb_search().- dataset_id
A string. Optional specific dataset ID. If
NULL(default), uses the current/latest feed URL.- ...
Additional arguments passed to
tidytransit::read_gtfs().
Value
A gtfs object as returned by tidytransit::read_gtfs().
Examples
if (FALSE) { # \dontrun{
# Read latest feed by ID (Bay Area Rapid Transit)
gtfs <- mobdb_read_gtfs("mdb-53")
# Read from search results
feeds <- feeds(provider = "TransLink", data_type = "gtfs")
gtfs <- mobdb_read_gtfs(feeds[1, ])
# Read specific historical dataset
gtfs_historical <- mobdb_read_gtfs("mdb-53", dataset_id = "mdb-53-202510250025")
} # }