Skip to content

Latest commit

 

History

History
62 lines (57 loc) · 42.2 KB

File metadata and controls

62 lines (57 loc) · 42.2 KB

GTFS Spreadsheet Schemas

Table of contents

GTFS Schedule Spreadsheet Schema

Field Name Type Presence Definition
id Unique ID System generated Unique identifier for the feed.
⚠️This field replaces mdb_source_id, that only contained digits, from a previous version of the schema.
Now an id can contain non-numeric characters.
data_type Enum Required The data format that the feed uses: gtfs.
features Array of Enums Optional An array of features that the feed includes based on https://gtfs.org/getting-started/features/overview/. This list is automatically extracted from the Canonical GTFS Schedule Validator.
Multiple features can be present, separated by a vertical bar (|).
status Enum Optional Describes status of the feed. Should be one of:
  • active: Feed should be used in public trip planners.
  • deprecated: Feed is explicitly deprecated and should not be used in public trip planners.
  • inactive: Feed hasn't been recently updated and should be used at risk of providing outdated information.
  • development: Feed is being used for development purposes and should not be used in public trip planners.
  • future: Feed is not yet active but will be in the future.
active, inactive and future statuses are updated based on the feedServiceWindowStart and feedServiceWindowEnd values extracted from the Canonical GTFS Schedule Validator.
is_official Enum Optional Flag indicating if the source comes from the agency itself or not.
  • True: Feed comes from the agency as an authorized source.
  • False: Feed is not from an official source, e.g. created by researchers or partners unaffiliated with the agency or municipality.
Feed's is_official status is assumed to be undefined if the cell is empty, meaning we cannot say if it's official or not.
redirect Object Optional When a feed is deprecated by a provider and replaced with a new URL, redirect information is provided to point to one or more new feed.
  • id
String Optional New feed ID that replaces the current feed that is out of date or no longer maintained by the provider.
Multiple feed ids can be present, separated by a vertical bar (|).
  • comment
Optional Optional Comment to explain redirect if needed (e.g new aggregate feed). Multiple comments can be present, separated by a vertical bar (|).
location Object Required Contains
  • Text that describes the feed's location in the country_code, subdivision_name, and municipality fields.
  • Latitude, longitude, date and time that describes the feed's bounding box in the bounding_box subobject.
  • country_code
Text Required ISO 3166-1 alpha-2 code designating the country where the feed service is located based on the number of stops. When multiple countries are included, the country with the most stops is displayed. For a list of valid codes see here.
  • subdivision_name
Text Optional ISO 3166-2 subdivision name designating the subdivision (e.g province, state, region) where the feed service is located based on the number of stops. When multiple subdivisions are included, the one with the most stops is displayed. For a list of valid names see here.
  • municipality
Text Optional Municipality in which the feed service is located based on the number of stops. When there are multiple municipalities, the one with the most stops is displayed
  • bounding_box
Object System generated Bounding box of the feed based on stops. Contains minimum_latitude, maximum_latitude, minimum_longitude, maximum_longitude and extracted_on fields. If the bounding box information displays as "null", you can check any potential feed errors with the GTFS validator.
    • minimum_latitude
Latitude System generated The minimum latitude for the feed's bounding box.
    • maximum_latitude
Latitude System generated The maximum latitude for the feed's bounding box.
    • minimum_longitude
Longitude System generated The minimum longitude for the feed's bounding box.
    • maximum_longitude
Longitude System generated The maximum longitude for the feed's bounding box.
    • extracted_on
Date and Time System generated The date and timestamp the bounding box was extracted on in UTC.
provider Text Required A commonly used name for the transit provider included in the feed.
feed_contact_email Text Optional The contact information for the data producer of the feed, discovered via feed_info.feed_contact_email in the feed, the provider's website, or the Mobility Database contributor form.
name Text Optional An optional description of the feed, e.g to specify if the feed is an aggregate of multiple providers, or which network is represented by the feed.
urls Object Required Contains URLs associated with the feed in the direct_download_url, latest, and license fields.
  • direct_download
URL Optional URL that automatically opens the feed.
  • authentication_type
Enum Optional The authentication_type field defines the type of authentication required to access the URL. Valid values for this field are:
  • 0 or (empty) - No authentication required.
  • 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information.
  • 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request.
When not provided, the authentication type is assumed to be 0.
  • authentication_info_url
URL Conditionally required If authentication is required, the authentication_info_url field contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created. This field is required for authentication_type=1 and authentication_type=2.
  • api_key_parameter_name
Text Conditionally required The api_key_parameter_name field defines the name of the parameter to pass in the URL to provide the API key. This field is required for authentication_type=1 and authentication_type=2.
  • latest
URL System generated A stable URL for the latest dataset of a feed.
  • license
URL Optional The license information for the direct download URL.

GTFS Realtime Spreadsheet Schema

Field Name Type Presence Definition
id Unique ID System generated Unique identifier for the feed.
⚠️This field replaces mdb_source_id, that only contained digits, from a previous version of the schema.
Now an id can contain non-numeric characters.
data_type Enum Required The data format that the feed uses: gtfs-rt.
entity_type Array of Enums Required The type of realtime entity: vp, tu, or sa which represent vehicle positions, trip updates, and service alerts.
Multiple entity_types can be present, separated by a vertical bar (|).
provider Text Required A commonly used name for the transit provider included in the feed.
name Text Optional An optional description of the feed, e.g to specify if the feed is an aggregate of multiple providers
note Text Optional A note to clarify complex use cases for consumers, for example when several static feeds are associated with a realtime feed.
features Array of Enums Optional An array of features which can be any of:
  • occupancy
status Enum Optional Describes status of the feed. Should be one of:
  • active: Feed should be used in public trip planners.
  • deprecated: Feed is explicitly deprecated and should not be used in public trip planners.
  • inactive: Feed hasn't been recently updated and should be used at risk of providing outdated information.
  • development: Feed is being used for development purposes and should not be used in public trip planners.
  • future: Feed is not yet active but will be in the future.
Feed is assumed to be active if status is not explicitly provided.
is_official Enum Optional Flag indicating if the source comes from the agency itself or not.
  • True: Feed comes from the agency as an authorized source.
  • False: Feed is not from an official source, e.g. created by researchers or partners unaffiliated with the agency or municipality.
Feed's is_official status is assumed to be undefined if the cell is empty, meaning we cannot say if it's official or not.
redirect Object Optional When a feed is deprecated by a provider and replaced with a new URL, redirect information is provided to point to one or more new feed.
  • id
String Optional New feed ID that replaces the current feed that is out of date or no longer maintained by the provider.
Multiple feed ids can be present, separated by a vertical bar (|)
  • comment
String Optional Comment to explain redirect if needed (e.g new aggregate feed).
Multiple comments can be present, separated by a vertical bar (|).
static_reference Array of Strings Optional A list of the static feeds that the real time feed is associated with, represented by their database IDs.
Multiple static_references can be present, separated by a vertical bar (|).
urls Object Required Contains URLs associated with the feed in the direct_download_url and license_url fields, and the authentication info for direct_download_url in the authentication_type, authentication_info_url and api_key_parameter_name fields.
  • direct_download_url
URL Required URL that responds with an encoded GTFS Realtime protocol buffer message.
  • authentication_type
Enum Optional The authentication_type field defines the type of authentication required to access the URL. Valid values for this field are:
  • 0 or (empty) - No authentication required.
  • 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information.
  • 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request.
  • 3: Ad-hoc authentication required, visit URL in authentication_info_url for more information.
When not provided, the authentication type is assumed to be 0.
  • authentication_info_url
URL Conditionally required If authentication is required, the authentication_info_url field contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created. This field is required for authentication_type=1 or greater.
  • api_key_parameter_name
Text Conditionally required The api_key_parameter_name field defines the name of the parameter to pass in the URL to provide the API key. This field is required for authentication_type=1 and authentication_type=2.
  • license_url
URL Optional The license information for direct_download_url.