Function to return performance data based on headways surrounding a given passenger's arrival time at a station on a given route.
Theadwaysperformance(enter_time, exit_time = NULL, enter_route_name,
exit_route_name, enter_stop_name, exit_stop_name, data, api_key)
Entrance time of passenger at station
End of window in which to look for train arrivals.
Route name for which headways should be returned.
Route name of exit stop for which headways should be returned.
Stop name (alpha, non-numeric) designating which station at which train headways information should be returned.
Stop name (alpha, non-numeric) designating towards which station train headways information should be returned.
Dataframe with named variables given by other arguments.
API key for MBTA Performance API. To obtain one, visit the MBTA Developer Portal (https://mbta.com/developers/mbta-performance/)
Average headway during the time period given between `enter_time` and `exit_time`.
Average of benchmark headways during time period given between `enter_time` and `exit_time`.
Average delay (actual headway - benchmark headway) during the time period given between `enter_time` and `exit_time`.
Arrival time of next train at given station that is after the entrance time given with `enter_time`.
Arrival time of previous train to be at station on given route immediately prior to the entrance time given with `enter_time`.
Difference (in seconds) between arrival time of next train and entrance time given with `enter_time`.
Benchmark headway time for the train arriving next after passenger's arrival. Divide by two to find benchmark wait time.