Create your data feed

Frequencies

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:

frequencies.txt file structure

The following example shows a simple frequencies.txt file:

trip_id,start_time,end_time,headway_secs

AWE1,05:30:00,06:30:00,300

AWE1,06:30:00,20:30:00,180

AWE1,20:30:00,28:00:00,420

If you define a trip in frequencies.txt file and provide the arrival_time and 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:

Field Description
start_time Specifies the time at which a service with the specified frequency begins.
end_time Specifies the time at which a service either changes to a different frequency or ceases at the first stop in the trip.
exact_times If the exact_times field is set to “1” fixed schedules are calculated based on start_date, end_time and headway_secs. The end_date is not considered part of the defined interval. For example, if a trip is defined as operating every half hour between 8:00:00 and 10:00:00, the last trip departs at 9:30:00.
headway_secs Specifies the time, in seconds, between departures from the same stop (headway) for this trip, during the time interval specified by start_time and end_time.

When you calculate 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 passenger just missed the previous trip. Defining large headway_secs of more than 20 minutes can create a bad user experience. This only applies when exact_times is set to "0" or is undefined.

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. 

Need more help?

Try these next steps:

Search
Clear search
Close search
Main menu
10524455971224269038
true
Search Help Center
true
true
true
true
true
82656
false
false