Learn R Programming

MBTAr (version 2.0.0)

Access Data from the Massachusetts Bay Transit Authority (MBTA) Web API

Description

Access to the MBTA's performance API for R. Creates an easy-to-use bundle of functions to work with all the built-in calls to the MBTA performance API, and some to work with the GTFS-compatible API V3 which replaced some functionality from the old performance API. Allows users to download realtime tracking data in dataframe format that is manipulable in standard R analytics functions. Pulls performance statistics in both realtime and for historical dates and trips (after July 2015).

Copy Link

Version

Install

install.packages('MBTAr')

Monthly Downloads

19

Version

2.0.0

License

GPL-3

Maintainer

Justin de BenedictisKessner

Last Published

November 12th, 2018

Functions in MBTAr (2.0.0)

Tpredictionsbytrip

Query predictions by trip
Theadwaysperformance

Function to return performance data based on headways surrounding a given passenger's arrival time at a station on a given route.
Tmetrics

Query real-time performance statistics.
Tstopsbyroute

Query stops by route
Troutes

Query all T routes
Tstopslookup

Search for information on a stop with a given name. Useful when stop_id is not known.
Tservertime

Queries the current MBTA API server time.
Tvehiclesbyroute

Query vehicles by a route
Tschedulebystop

Query schedule by stop
Tstopsbylocation

Query stops by goegraphic location
Tvehiclesbytrip

Query vehicles by a particular trip.
Tschedulebytrip

Query schedule by trip
Tpredictionsbyroute

Query predictions by route
Tpredictionsbystop

Query predictions by stop
Tdailymetrics

Query daily performance statistics.
Theadways

To get headways and train arrive times for a given station/route/direction in a certain time window.. Returns a list of headways at an origin station during a particular time period on a particular route.
Talertbyid

Queries active and upcoming times for a particular alert.
Ttravelperformance

Query performance statistics for many trips contained in a dataframe.
Talerts

Query all active and upcoming alerts.
Ttraveltimes

Query travel times and travel time performance
Troutesbystop

Query all routes at a stop
Tschedulebyroute

Query the schedule by route
routes

Routes and respective information for the MBTA system