mobdb_read_gtfs: Read GTFS feed directly from Mobility Database

View source: R/integration-tidytransit.R

mobdb_read_gtfsR Documentation

Read GTFS feed directly from Mobility Database

Description

[Superseded]

Note: 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.

Usage

mobdb_read_gtfs(feed_id, dataset_id = NULL, ...)

Arguments

feed_id

A string. The unique identifier for the feed, or a data frame with a single row from feeds() or mobdb_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


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


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