Troutes: Query all T routes

Description Usage Arguments Value See Also Examples

Description

Returns information about all routes for which information can be requested.

Usage

1
Troutes(api_key) 

Arguments

api_key

API key for MBTA API. To obtain one, visit the MBTA Developer Portal (http://realtime.mbta.com/Portal/)

Value

route_type

The GTFS-compatible identifier for the type of service (mode). Example: "2"

mode_name

The human-readable name for the type of service (mode). Example: "Commuter Rail"

route_id

The unique GTFS-compatible identifier for the route. Example: "CR-Providence"

route_name

The human-readable name for the route. Example: "Providence/Stoughton Line"

See Also

Troutesbystop

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  ## Authenticate:
  
  mykey <- NULL
  mykey <- assign("mykey", value = test_key, envir = .GlobalEnv)
  ## use your own key from http://realtime.mbta.com/Portal/ instead of the test key

	Troutes(api_key = mykey)

	## returns:
	    # route_type     mode_name         route_id                   route_name
# 1            0        Subway          Green-B                 Green Line B
# 2            0        Subway          Green-C                 Green Line C
# 3            0        Subway          Green-D                 Green Line D
# 4            0        Subway          Green-E                 Green Line E
# 5            0        Subway         Mattapan             Mattapan Trolley
# 6            1        Subway             Blue                    Blue Line
# 7            1        Subway           Orange                  Orange Line
# 8            1        Subway              Red                     Red Line
# 9            2 Commuter Rail     CR-Fairmount               Fairmount Line
# 10           2 Commuter Rail     CR-Fitchburg               Fitchburg Line
# ...
# 207          3           Bus             9702                         9702
# 208          3           Bus             9703                         9703
# 209          4          Boat          Boat-F4            Charlestown Ferry
# 210          4          Boat          Boat-F1                Hingham Ferry
# 211          4          Boat          Boat-F3                   Hull Ferry

MBTAr documentation built on May 2, 2019, 6:59 a.m.

Related to Troutes in MBTAr...