Agencies and operators

Distinctions between agencies and operators

An agency represents a single GTFS agencies.txt entity that was imported from a single feed version. The metadata, routes, etc., for an agency include only the data for that specific agency in that specific feed version.

Operators are a higher-level abstraction over agencies, with each operator defined by an entry in the Transitland Atlas. Operators provide a method for enriching the basic GTFS agency data, as well as grouping agencies that span across multiple source feeds. Operators are matched with GTFS agencies using associated_feeds, a simple list of Feed Onestop IDs and GTFS agency_ids. For instance, the Atlas operator record for the New York City MTA has associated_feeds values for 8 different GTFS feeds. A query for this operator Onestop ID thus represents the union of data from all 8 feeds, and includes routes for the subway, bus service for all 5 boroughs, commuter rail agencies, etc., operated by the MTA. This record also includes additional metadata about the MTA, such as the United States National Transit Database (NTD) ID, Wikidata IDs, and alternate names for the agency. Operator records are created and maintained through pull requests to the Atlas DMFR files and synchronized with the Transitland database on each commit.

Default operators

The operators implementation includes a fall-back to ensure that all agencies and routes are available through operators queries, even if an Atlas operator record is not defined or the association is broken. In this case, an operator record is automatically generated for each unmatched agency. For example (at the time of writing), the West Berkeley Shuttle uses an automatically generated operator record. However, some fields such as operator_name will be null in this case.

Unmatched operators

Note that occasionally an operator will fail to associate with the intended agencies. This usually happens when a feed containing multiple agencies has a change in agency_id values that need to be updated in the operator Atlas record. If you come across such a record, please let us know or open an Atlas pull request to update the operator metadata.