On the first day of Dashboard week, we were tasked with scraping data from the Transport NSW website and finding insights that can be visualised in Tableau. A wide variety of content exists on the website. This includes live road and maritime traffic data as well as infrastructure and asset information. Thankfully, I find that documentation on the website is relatively abundant and easy to find. For example, I found this useful data dictionary and this document when completing today’s challenge. Given the myriad choices available, I made the mistake of grabbing too much data early in the day (without much thought of how to use it !). Given the limited time for the task, I would try in the next challenge to……

 

 

Start with an Appropriate Goal and Data Set Size

The process of downloading data through the API is fairly straightforward. However, with each new data set came the realisation that understanding what each field meant would take time. Time that could be better spent on planning for an achievable goal. Out of the 4 data sets I downloaded and prepared, only 2 were compatible with the goal I had in mind. This goal was vaguely about understanding if the availability of public transport affects traffic volume. After some hasty data prep, I ended up with the following Alteryx workflow:

 

Note the unused data in containers.

 

For what it’s worth, I learnt today what the following error means when trying to export a file from Alteryx to Tableau:

” invalid unordered_map<K, T> key “

This happened to me because there isn’t a Time only field type¬†in Tableau. But, in Alteryx, this can be readily created. Changing the Time field back to a string field solved this error for me.

 

 

Visualising Transport data in Tableau

My final viz showed the traffic volume at each location where a traffic “counter” device was sited. Users can see where the top 10 busiest road/road sections are. When hovering over the map, the locations of nearby public transport options are shown together with some brief descriptions. I was not able to analyse correlations (if any) between public transport availability and traffic volume. Nevertheless, the viz can be used to quickly determine average traffic volume.

 

Thanks for reading this blog post! Check out the Viz at my Tableau Public page. I await the next challenge on day 2 of Dashboard Week.

 

Alex Chan
Author: Alex Chan