Dashboard Week Day 1: NBA Season Schedule

by Lee Gibbons

The infamous dashboard week is finally upon us DS6-ers and the pressure is on! For day 1 we were thrown into the deep end with NBA stats – check Andy’s blog for the full breakdown.

I drew scenario 6 from the pot and so the focus of my dashboard was “season schedule with game by game result”.

I’ll give a brief overview here of the process I undertook to approach this task. From scraping (yes, we were not even given the data!) to the final product. So, let’s dive in:


Finding Data

Seeing as the data I was looking for was the 2016-2017 NBA season just passed, I did not feel the need to use an API (plus those that we found were rather tricky to use), therefore a static table was all I needed. I scoured the web for the game summary information and, remembering back to a data scraping class, used a nifty trick for pulling data from a web page.

Google sheets has an incredibly useful formula:

=ImportHTML(“ENTERURL”, “table”, #)

It enables the import of only the data that appears in a particular table within a web page. This process was utilised to create a sheet of game info per month of the season from October-June.


Alteryx Clean and Prep

Next, I fired up Alteryx to union all the sheets, clean the data for tableau and to generate a set of URLs that I wanted to use in the dashboard to supply the user with more info.

Here’s the workflow split into three stages:

Stage 1 – input and union all the sheets

Stage 2 – involved reshaping the data and creating individual URLs (see notes in picture above container 2)

Stage 3 – join and union dates to fill in gaps for calendar ready for Tableau.


Tableau Dashboard

The dashboard itself proved the most time-consuming part of this process in terms of getting it to work and formatting.

The charts were simplistic, however, actions and context were required to allow the desired functionality.

A picture of the finished product can be found below, or click here to interact with the dashboard.