Frequencies are used to describe services that don’t follow a fixed schedule - for example, subway services that run every 5-15 minutes. Define frequencies with the frequencies.txt file, which has the following structure:
The following example shows a simple frequencies.txt file:
If you define a trip in frequencies.txt file and provide the
departure_time fields, we ignore those fields' absolute values in stop_times.txt. Instead, we use the stop_times.txt time values to calculate the relative travel time between the individual stops.
Fields defined within frequencies.txt
The following table describes the fields in the frequencies.txt feed:
||Specifies the time at which a service with the specified frequency begins.|
||Specifies the time at which a service either changes to a different frequency or ceases at the first stop in the trip.|
||Specifies the time, in seconds, between departures from the same stop (headway) for this trip, during the time interval specified by
When calculating routes for frequency-based trips, the
headway_secs value is considered to be waiting time for the trip, under the worst-case assumption that the rider just missed the previous trip. Defining large
headway_secs of more than 20 minutes can create a bad user experience.
Frequencies for schedule-based trips
You can use frequencies to model schedule-based trips that follow a simple, repeated pattern. For example, use frequencies to provide data about a bus that departs at the top of every hour. In this case, the
exact_times field is "1" to indicate that defined frequencies should result in fixed schedules.