In late June, I published the Kobe Bryant visualization above after having been inspired by this beautiful Judit Bekker viz, ‘Moon Phases 2020.’ It had been well over a year since my last radial style visualization, so to aid in the building process, I reverse-engineered this awesome viz by Simon Beaumont, ‘Alan Shearer’s Premier League Goal Scoring.’ I was pleasantly surprised with how well the Kobe radial viz was received and was asked on several occasions if I would be writing a blog, sharing how the viz was created. So, while it should be noted that the creation of this viz would not have happened without the ability to download the vizzes by Judit and Simon or without amazing blog posts such as ‘Who’s Afraid of the Big Bad Radial Bar Chart? and ‘Beyond Show Me Part 2: Trigonometry’ by Kevin Flerlage and Ken Flerlage, I do feel it’s powerful to share what can be accomplished by downloading and reverse-engineering a viz from Tableau Public or by reading a blog post about a subject you may have avoided at all costs throughout high school and college!! So, let’s take a look at how I went about creating the Kobe Bryant Career Scoring radial chart.

## The Data

After exploring Simon’s visualization a bit, it was clear I would need just two fields to build the radial lines for each season and a third field to size the dots that would be plotted around these radial lines. I had an old data set of Kobe’s career points by game laying around, because why wouldn’t I ;). So with the data ready to go, I was able to jump right into Tableau. Below is what the data looked like, with my key fields highlighted in yellow. In all reality, I could have built the entire viz with just these three fields, as the others were only used in tooltips, with the exception of *Season ID*, which was used for the bar charts…although I could have gotten away with using Radius for that, as it also corresponds to the Season ID.

With the data pulled into Tableau, I was ready to get this show on the road, by building out a few calculations. Three calculations are needed to build the radial lines that the dots are plotted along. They are as follows;

- An angle calculation for each of Kobe’s games played (called
)**Game Angle** (to plot the x coordinates of each mark in the view)**X**(to plot the y coordinates of each mark in the view)**Y**

As we walk through the calculations in this post, I’ll do my best to explain what’s happening, but to gain a better understanding, I’ll again refer you to this fantastic blog post by 3x Tableau Zen Master, Ken Flerlage, titled ‘Beyond Show Me Part 2: Trigonometry.’

**Game Angle** – we need this to calculate X and Y, so we’ll start here.

To calculate the Game Angle, let’s first understand our spacing between each point (Game ID). Our Game ID field counts the games of each NBA season (a full NBA season is 82 games in length, so each season should have Game IDs running from 1 to 82). To figure out our spacing for a full circle we would take 360 (degrees in a circle) and divide that by the number of games in a season, which gives us 360/82 or 4.39 degrees between each point.

This spacing would work if our plan was to fill the entire circle. However, since we’re only using the first three quadrants of the circle and leaving the fourth quadrant blank, we need to push the spacing a little closer together. To do this, we replace 82 with 108, as this gives us the proper spacing (360/108 = 3.3333 degrees between each point) allowing Game ID 82 to fall right at 270 degrees. To get the proper angle for each Game ID we need to multiply Game ID – 1 by our spacing of 3.3333. For instance Game ID 1 would land at 0 degrees (0 x 3.333), while Game ID 2 would land at 3.3333 degrees (1 x 3.3333), Game ID 3 at 6.6667 degrees (2 x 3.3333) and so on.

Now that we have our **Game Angle** calculation, we can use it to calculate the values for **X** and **Y**. If you recall from reading Ken’s blog post, our Game Angle calculation will need to be converted to Radians, but we’ll just do that within each calculation. So, our **X** and **Y** calculations are as follows;

X = COS(RADIANS([Game Angle])) * [Radius]

Y = SIN(RADIANS([Game Angle])) * [Radius]

## Building the Viz

We now have three of our four calculations needed to build the radial, so let’s walk through building it, together. We’ll begin by filtering Player to Kobe, as I’ve added other players to the data set since completing the Kobe viz. Now do the following;

- Place X on the Columns shelf
- Place Y on the Rows shelf
- Drag Radius to Detail
- Change the Mark type to Line
- Drag Game ID to Path

You should end up with the below radial. However, we want Game ID 1 to start at 12 o’clock with the Game IDs moving in a clockwise direction as opposed to the current configuration, where Game ID 1 starts at 3 o’clock and Game IDs move counter-clockwise. To fix this, simply swap Rows and Columns and you’ll end up with the second of the two images below.

Now that we have the radial lines for each of Kobe’s astonishing twenty seasons in the NBA, we’re ready to plot the dots that represent how many points he scored in each game. To add the dots, do the following;

- Place Y on the Columns Shelf next to the existing Y
- Create a Dual Axis
- Synchronize the Axis
- Hide the Headers
- From the Marks card, change the second instance of Y to Circle

After changing the circle color to purple and increasing the size a bit, your viz should now look like the image below. We’re just about there!

The only calculation remaining for the radial is the one that will color the dots according to how many points Kobe scored. For this calculation, I simply broke down his scoring into four groups, which you can see below.

After dropping this calculation on the Color card and setting our colors to Lakers colors, we’ll be left with the visualization below. I wanted all of Kobe’s 50+ point games to stand out, which is why they are colored white, with 10-49 point games colored in Lakers purple and yellow. Finally, Kobe’s games scoring less than 10 points, which occurred almost exclusively in the first couple years of his career, when he wasn’t getting much playing time, are colored a neutral gray. My two favorite parts of the viz are Kobe’s 2007 season in which he scores 50+ points in a stretch of five out of seven games, toward the end of the season, on his way to winning the NBA Scoring Title. The other is how clearly his 60-point career finale sticks out.

And while this is a nice visual, it doesn’t quite do Kobe’s greatest games justice, so we’ll add the PTS field to Size and just like that, our radial is complete!! Now you can really see that 81-point outburst against the Toronto Raptors, on January 22, 2006.

The only other parts of the visualization built in Tableau are the bar charts that show how many total points Kobe scored each season and the button for the information overlay.

## The Printed Version

Since I knew this was a visualization I’d eventually want to print and add to my Etsy shop, all of the text was done in Adobe Illustrator to allow for a high quality print. Here’s the Kobe print as it appears in my shop. To celebrate the return of the NBA season, I’ll be running a 20% off sale beginning Thursday, July 30th through the NBA Finals for anyone interested in purchasing this viz or any other from the shop. Thank you so much for reading, I hope you found this post helpful and if you have any questions, please don’t hesitate to reach out to me on Twitter. Have a great day!!