Want to Create GTFS Data? What’s in GTFS feeds?

Create GTFS - General Transit Feed SpecificationHave you ever created a GTFS data feed and wondered what’s inside?  Well here’s a quick run down / lay persons guide….

A GTFS (General Transit File Specification) file is a group of files that have been “zipped”.  “Zipping” a file is a way of compressing a group of files or directories into a single file.  This makes the total file size smaller and quicker to copy around.  It also means the person who is transferring the zipped file only needs to think about the single zipped file, rather than having to remember all the files that have been compressed inside it.

The GTFS file will contain a number of required files and potentially some optional files.  The required files are enough to produce basic routes and schedules, whereas the optional files add supplemental information that enriches, supports and (sometimes) simplifies the required information.

The required GTFS files that must be created are:

  • Agency: Describes the company that provides the transit service
  • Stops: Describes where the vehicles pick up and/or drop off passengers
  • Routes: Contains summary information about a route detail (e.g. Jamestown Line, 452 Bus route, etc.)
  • Calendar: Specifies on which days a service runs
  • Trips: Contains information for each trip that occurs on a route for a particular service day
  • StopTimes: Contains the detailed information about the trip describing at what time the vehicle arrives and departs from a particular stop

You can also create GTFS files that are considered optional:

  • Calendar Dates: This file identifies which days have exceptions to the standard calendar (e.g. Altered services for holidays, additional services, no services, etc.).  Most GTFS feeds will include this file.
  • Fare Attributes & Fare Rules: These two files are used to describe the standard adult fare.  One of the limitations of the specification at the moment is that most transit operators have a variety of fares (e.g. Child, Seniors, Monthly tickets, etc.) and the file specification does not yet cater for these.  Rather than publish partial information, many agencies choose to not include fare information.
  •  Shapes: This file is used to draw the route on maps.  The majority of GTFS feeds will include this file.
  • Frequencies: This file is used to simplify schedules when a trip occurs at regular intervals (e.g. The bus runs every 30 minutes).  This file is typically included when you have a timetable that has a repeatable schedule for a number of hours, as it lessens the data keying effort, reduces the risk of errors.  It also enables the software that displays the information to better convey the schedule  e.g. “Every 30 minutes”, rather than “Next bus 30 minutes, then another in 1 hour”.
  • Transfers: This includes rules for making transfers between routes.  This file is typically included for major transit agencies (e.g. time between platforms or between bus bays), but is often not relevant for smaller agencies.
  • Feed Info: This describes who published the feed, what version of the feed it is and when it expires. The information inside this file is used by people who manage and manipulate the GTFS files. The inclusion of this file is a good idea (though of course, it is still optional).

We’ll discuss each of the files in detail in future posts.

If you can’t want and just need to know more now, the full specification is available here: https://developers.google.com/transit/gtfs/reference

And if you want to create GTFS data, you might way to try our GTFS Editor.  Here’s the link so you can get started: https://addtransit.com/sign_up.php

Have a great day!

Leave a Reply

Your email address will not be published. Required fields are marked *