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