A GTFS .zip file may contain a dozen or more files, however, most agencies only need to focus on the following six .txt files to accomplish much of the work. These files are: agency.txt, routes.txt, calendar.txt, trips.txt, stop_times.txt, and stops.txt. All of the files in a GTFS feed work in concert to describe the whole picture of an agency's service. You can think of these individual files as puzzle pieces; they need to be pieced together in a certain way to complete the picture.
Image sourced from Unsplash.com
The Agency file contains information about the transit agency like contact information and a URL to the agency's fares webpage.
Image sourced from Bing Maps
This file describes the different routes an agency operates. Each entry represents an individual route which includes different fields ranging from a description of the route to route and text colors which will show up on trip planning applications.
Image sourced from Pexels.com
Calendar.txt contains the start and end dates for a schedule's service period. It also describes the service days that will run throughout a given service period (i.e. Monday - Friday, Monday - Thursday etc). Can be substituted for calendar_dates.txt and vice versa.
Image sourced from Google Maps
Trips.txt represents every trip operated by an agency. It is organized by route and service period. This file even has the option to denote wheelchair accessibility, if bikes are allowed, and blocks for interlined service.
Image sourced from Apple Maps
Stop_times describes the actual arrival/departure times, stops used, and stop sequences per trip.
Image sourced from Pixabay.com
Stops.txt is an inventory of every stop an agency maintains. Each entry in the file represents an individual stop's information. This information includes latitude and longitude coordinates, the stop's name, and can include URLs or stop descriptions.
Image sourced from Pexels.com
Calendar_dates describes the service exceptions an agency might run during a schedule. For example, suspending service for Christmas day or adding more service for Independence day could be represented in the GTFS. Can be substituted for calendar.txt and vice versa.
Image sourced from Pexels.com
Shapes.txt contains the data used to describe a vehicle's path of travel along a route alignment.. This data includes the latitude and longitude coordinates for each point on the route alignment. Shapes.txt can also keep track of distance travelled along a route alignment.
Image sourced from Pexels.com
Feed_info contains information about the GTFS feed. It can include fields that describe the default language and feed_start_date and feed_end_date for when a schedule has valid GTFS. Feed_info also contains information about the publisher of the GTFS which may be different from the transit agency.
Image sourced from Pixabay.com
Fare_attributes is one of four different files that are used to describe fares. Fare_attributes is responsible for displaying a fare's price, currency type, and payment method - important information for riders.
Image sourced from Pexels.com
Fare_rules is used to establish which routes or origins and destinations a fare is valid on. For example, if a given route requires its own fare separate from the other routes.
Image sourced from Transit app
Frequencies.txt might not be used in every GTFS feed, but it's a powerful file used to describe trips that repeat on regular headways.
Image sourced from Pixabay.com
This file is used to provide translations for any text field within the dataset. For example, it may be helpful for your GTFS to include multiple translations of a stop_name like "Grocery Parking Lot (west side)" since it does not refer to any named landmarks.