Each departure of a trip is counted once, however many stops it visits
within the time of day (unlike get_stop_frequency() and
tidytransit::get_route_frequency(), which count stop departures).
Scheduled trips depart at their earliest departure_time in stop_times
(blank times are ignored); trips without any departure time are not
counted. Trips listed in frequencies depart every headway_secs from
start_time until (but not including) end_time, as in
frequencies_to_stop_times(), even if they are not listed in stop_times;
their stop_times entries are templates and are not used. An error is
raised if frequencies has invalid entries for the specified routes.
A departure is counted when it happens at or after from and before to
(unlike in filter_by_time_of_day(), which also keeps entries at to).
Departures after midnight are listed with times past "24:00:00", so use a
time of day such as "24:00:00"-"26:00:00" to count them.
Times after midnight written as early morning times (e.g. "00:30:00"
instead of "24:30:00"), and end_times earlier than start_times in
frequencies, are first fixed with fix_overnight_times(), so these
trips are counted at their real times. Without an integer stop_sequence
column, the times of stop_times can't be ordered and are used as
written.
The mean headway is the length of the time of day divided by the number of
departures, so it overstates the actual headway when service starts or ends
within the time of day. Without a direction_id field in trips, the
departures of both directions are pooled; trips with an NA direction_id
are grouped together.