Dude, Where's My Bus? - 2020 Shiny Contest Submission

Dude, Where's My Bus?

Authors: Matt Lie
Working with Shiny < 1 year

Abstract: Tools that help answer the titular question - Dude, Where's My Bus?

Full Description: This Shiny application provides the user with a series of tools to inform them about the location and due times of buses and trains at multiple stops and positions in Auckland, New Zealand, helping to answer the question posed by the app's title - Dude, Where's My Bus?

This application was born upon discovering the existence of the Auckland Transport API, which provides transport feed information as per the Google Transit Feed Specification (GTFS). Static information and route geometries can be accessed via Auckland Transport open data platforms.

The application is made up of a number of tools which provide a series of advantages over the existing available public transport tools:

  • Multiple Real Time Boards - the ability to view the due and delay of buses/trains at more than one stop, allowing users who can take multiple routes to complete their journey from A to B to see all the information consolidated in one place. Existing solutions only allow you to see the due time information of various services for one stop at once. Additionally, the user location can be provided; if this is provided, the walking time to stop is calculated and displayed so the user can determine if it is worthwhile heading to one stop over another, depending on when the bus is due and how long it would take them to arrive at the stop
  • Live Bus Locations - the live vehicle locations of all buses/trains on any route(s) selected by the user are plotted on a map, along with the route geometry and stops on the route. A popup on each of the vehicle location markers indicates their current position and how far ahead or behind of schedule they are.
  • Find A Stop - A map displaying all stops in a region observed by the user, with any stops that are on a selected route displayed in a different colour to differentiate them. The map can be re-centered around a search location to help the user locate relevant stops.

In addition to these tools, other functionality has also been built in:

  • Bookmarking to save view states for the multiple real time boards view and live bus locations views
  • Auto-refresh capability on the board

Tools used to build the dashboard:

  • Leaflet and Datatables for rendering maps and tables data
  • OSRM and Nominatim OSM engines for geocoding and route calculation
  • Waiter for loading screens
  • Shinyjs, Shinywidgets and shinycssloaders for custom UI interactivity

Category: Other
Keywords: Public Transport, New Zealand
Shiny app: https://mklienz.shinyapps.io/dude-wmb/
Repo: GitHub - mklienz/dude-wmb: Dude, Where's My Bus? - A Shiny Application
RStudio Cloud: Posit Cloud

Thumbnail:
image

Full image:

1 Like