Bus travel times for public transit users is the sum of waiting time and transit time. Whereas trip time is generally predictable, wait times can vary considerably based on bus travel speed patterns. Pittsburgh's buses, like many mass transit systems, are prone to bunching, which can cause wait times to vary considerably. In this byte, I explore visualizing how expected wait times vary throughout the course of a day.
The Port Authority of Allegheny County utilizes an automatic vehicle location (AVL) service to provide real-time location information for its buses. Expanding on previous work, I collected location data for all Route 61 buses for the month of February 2016.
The dataset was created and prepared in the following manner:
This byte allows the user to explore the average wait times for different stops. The first graph is created using a Google API, and was simple and straightforward to implement.
The second graph is created using D3. For someone experienced with creating visualizations with D3, I imagine this would also be straightforward. I wanted to contrast average waiting times with the excess waiting time, so I graphed the excess waiting time below the average waiting time. Unfortunately, I struggled to get the scale to line up correctly. In reality, it seems I may need to manually code a scale, rather than using D3's excellent yAxis and scale functions.
The visual is a bit cumbersome to navigate. Unless viewed on a large screen, the user must scroll down after selecting a stop to see the data, which makes it hard to compare between stops. A more effective implementation might place the navigation map on the left-hand side, and graphs on the right-hand side.
My conclusion is that D3 is incredible, but non-trivial to implement. I leave the following for myself to improve this byte: