lookupstop.Rd
This function allows to lookup the information of stops, including stop ID, direction, longitude and latitude based on the arguments of bus number, stop name and stop direction.
lookupstop(bus, stopname = NULL, dir = NULL, key = Sys.getenv("BUS_CLIENT_KEY"))
bus | Bus number. |
---|---|
stopname | Name of bus stop.It is optional and case insensitive. |
dir | Direction of routes.It is optional and case insensitive. |
key | Key for accessing the API. |
Dataframe with potential matching stop with bus number, stop ID, direction, longitude and latitude columns.
lookupstop(bus = 1, stopname = "Michigan")#> bus_num direction stop_id stop_name lat lon #> 1 1 Northbound 1564 3000 S Michigan 41.84061 -87.62321 #> 2 1 Northbound 1581 Michigan & 11th Street 41.86910 -87.62397 #> 3 1 Northbound 1579 Michigan & 13th Street 41.86617 -87.62408 #> 4 1 Northbound 18318 Michigan & 14th Street 41.86436 -87.62404 #> 5 1 Northbound 14760 Michigan & 16th Street 41.86047 -87.62397 #> 6 1 Northbound 1575 Michigan & 18th Street 41.85819 -87.62386 #> 7 1 Northbound 1573 Michigan & 21st Street 41.85455 -87.62381 #> 8 1 Northbound 1570 Michigan & 23rd Street 41.85137 -87.62367 #> 9 1 Northbound 15313 Michigan & 24th Street 41.84946 -87.62367 #> 10 1 Northbound 1568 Michigan & 25th Street 41.84738 -87.62354 #> 11 1 Northbound 1567 Michigan & 26th Street 41.84595 -87.62333 #> 12 1 Northbound 1566 Michigan & 28th Street 41.84372 -87.62329 #> 13 1 Northbound 1565 Michigan & 29th Street 41.84193 -87.62324 #> 14 1 Northbound 1583 Michigan & 8th Street 41.87173 -87.62402 #> 15 1 Northbound 1582 Michigan & 9th Street 41.87039 -87.62399 #> 16 1 Northbound 1584 Michigan & Balbo 41.87344 -87.62411 #> 17 1 Northbound 15312 Michigan & Cermak 41.85339 -87.62367 #> 18 1 Northbound 1574 Michigan & Cullerton 41.85577 -87.62386 #> 19 1 Northbound 14485 Michigan & Ida B Wells Drive 41.87553 -87.62418 #> 20 1 Northbound 1580 Michigan & Roosevelt 41.86791 -87.62399 #> 21 1 Northbound 75 Michigan & Van Buren 41.87655 -87.62402 #> 22 1 Southbound 1606 3000 S Michigan 41.84045 -87.62356 #> 23 1 Southbound 1590 Michigan & 11th Street 41.86892 -87.62394 #> 24 1 Southbound 1592 Michigan & 13th Street 41.86553 -87.62399 #> 25 1 Southbound 1593 Michigan & 14th Street 41.86391 -87.62414 #> 26 1 Southbound 1595 Michigan & 16th Street 41.85997 -87.62403 #> 27 1 Southbound 1596 Michigan & 18th Street 41.85763 -87.62405 #> 28 1 Southbound 1598 Michigan & 21st Street 41.85405 -87.62384 #> 29 1 Southbound 16014 Michigan & 23rd Street 41.85130 -87.62383 #> 30 1 Southbound 17243 Michigan & 24th Street 41.84946 -87.62383 #> 31 1 Southbound 1602 Michigan & 25th Street 41.84723 -87.62372 #> 32 1 Southbound 1603 Michigan & 26th Street 41.84534 -87.62364 #> 33 1 Southbound 1604 Michigan & 28th Street 41.84311 -87.62359 #> 34 1 Southbound 1605 Michigan & 29th Street 41.84177 -87.62359 #> 35 1 Southbound 1607 Michigan & 31st Street 41.83800 -87.62349 #> 36 1 Southbound 1608 Michigan & 32nd Street 41.83619 -87.62346 #> 37 1 Southbound 1609 Michigan & 33rd Street 41.83442 -87.62340 #> 38 1 Southbound 1610 Michigan & 34th Street 41.83272 -87.62335 #> 39 1 Southbound 1611 Michigan & 35th Street 41.83117 -87.62332 #> 40 1 Southbound 1588 Michigan & 8th Street 41.87214 -87.62405 #> 41 1 Southbound 1589 Michigan & 9th Street 41.87044 -87.62392 #> 42 1 Southbound 1587 Michigan & Balbo 41.87342 -87.62418 #> 43 1 Southbound 1599 Michigan & Cermak 41.85246 -87.62380 #> 44 1 Southbound 1597 Michigan & Cullerton 41.85525 -87.62386 #> 45 1 Southbound 1586 Michigan & Harrison 41.87475 -87.62428 #> 46 1 Southbound 1591 Michigan & Roosevelt 41.86676 -87.62397 #> 47 1 Southbound 73 Michigan & Van Buren/Congress 41.87649 -87.62431lookupstop(bus = 1, dir = "Southbound")#> bus_num direction stop_id stop_name lat lon #> 1 1 Southbound 1606 3000 S Michigan 41.84045 -87.62356 #> 2 1 Southbound 67 Jackson & Canal 41.87801 -87.64001 #> 3 1 Southbound 14461 Jackson & Chicago River 41.87797 -87.63851 #> 4 1 Southbound 70 Jackson & Dearborn 41.87814 -87.62949 #> 5 1 Southbound 69 Jackson & Financial Place 41.87810 -87.63287 #> 6 1 Southbound 68 Jackson & Franklin 41.87807 -87.63540 #> 7 1 Southbound 71 Jackson & State 41.87816 -87.62791 #> 8 1 Southbound 72 Jackson & Wabash 41.87824 -87.62532 #> 9 1 Southbound 1590 Michigan & 11th Street 41.86892 -87.62394 #> 10 1 Southbound 1592 Michigan & 13th Street 41.86553 -87.62399 #> 11 1 Southbound 1593 Michigan & 14th Street 41.86391 -87.62414 #> 12 1 Southbound 1595 Michigan & 16th Street 41.85997 -87.62403 #> 13 1 Southbound 1596 Michigan & 18th Street 41.85763 -87.62405 #> 14 1 Southbound 1598 Michigan & 21st Street 41.85405 -87.62384 #> 15 1 Southbound 16014 Michigan & 23rd Street 41.85130 -87.62383 #> 16 1 Southbound 17243 Michigan & 24th Street 41.84946 -87.62383 #> 17 1 Southbound 1602 Michigan & 25th Street 41.84723 -87.62372 #> 18 1 Southbound 1603 Michigan & 26th Street 41.84534 -87.62364 #> 19 1 Southbound 1604 Michigan & 28th Street 41.84311 -87.62359 #> 20 1 Southbound 1605 Michigan & 29th Street 41.84177 -87.62359 #> 21 1 Southbound 1607 Michigan & 31st Street 41.83800 -87.62349 #> 22 1 Southbound 1608 Michigan & 32nd Street 41.83619 -87.62346 #> 23 1 Southbound 1609 Michigan & 33rd Street 41.83442 -87.62340 #> 24 1 Southbound 1610 Michigan & 34th Street 41.83272 -87.62335 #> 25 1 Southbound 1611 Michigan & 35th Street 41.83117 -87.62332 #> 26 1 Southbound 1588 Michigan & 8th Street 41.87214 -87.62405 #> 27 1 Southbound 1589 Michigan & 9th Street 41.87044 -87.62392 #> 28 1 Southbound 1587 Michigan & Balbo 41.87342 -87.62418 #> 29 1 Southbound 1599 Michigan & Cermak 41.85246 -87.62380 #> 30 1 Southbound 1597 Michigan & Cullerton 41.85525 -87.62386 #> 31 1 Southbound 1586 Michigan & Harrison 41.87475 -87.62428 #> 32 1 Southbound 1591 Michigan & Roosevelt 41.86676 -87.62397 #> 33 1 Southbound 73 Michigan & Van Buren/Congress 41.87649 -87.62431lookupstop(bus = 1, stopname = "indiana", dir = "northbound")#> bus_num direction stop_id stop_name lat lon #> 1 1 Northbound 1563 Indiana & 31st Street 41.83828 -87.62187 #> 2 1 Northbound 1562 Indiana & 32nd Street 41.83647 -87.62184 #> 3 1 Northbound 16119 Indiana & 33rd Boulevard 41.83493 -87.62186 #> 4 1 Northbound 1560 Indiana & 34th Street 41.83299 -87.62179 #> 5 1 Northbound 15314 Indiana & 35th Street 41.83113 -87.62155