Dashboard Week Day 1: NBA Franchise History

by Jamie Gough

Today was our first day of dashboard week and we had to create dashboards with NBA data.  I drew lot number 4 and ended up with the task of creating a dashboard that illustrates NBA franchise history.

With such a broad topic, my initial aim was to find a data source big enough provide insight over a large period of the NBA. Thankfully, I found FivethirtyEight’s historical ELO ratings on GitHub, which included the score of every game since 1950. From this, I could map franchises ratings across time, win/loss percentages as well as game info. However, Githubs database was only up until the conclusion of the 2015 season. This left me in a position where I would have to scrape the data myself, as I could not guarantee a 2 season scrape would match Githubs file.

To scrape the required data for my dashboard, I had to create a batch macro.  The batch macro had to run through FivethirtyEight’s data site and return the historical statistics for 53 franchises, 30 current and 23 discontinued. The batch macro is the first part of the workflow below.

Once the batch macro downloaded the data, it needed a JSON parser to begin creating a table that would be readable by tableau. Multiple tools were then used to create the table, including a cross tab and multi row formula, to ensure the output was correct. Despite all this information, I noticed the opposition franchise name was not available, therfore I had to bring in the GitHub file to match franchise names to their code. After this process, I was left with over 130,000 usable rows of data.


Now I had the data for over 60 seasons of NBA games, I moved onto creating three visualisations for my dashboard. The first view illustrates how a franchises ELO rating changed over their history, on a game by game basis. The second view breaks down franchise performance in every season by plotting their wins minus losses against their average point difference per game. Finally, I chose to plot each franchises winning percentage over time.


Overall, day 1 proved to be very challenging as it required the use many skills in a short period of time. Hopefully, the experience will leave me in good shape for the rest of the week.