Hello World! I’m starting this blog as a bit of an experiment and as an incentive to keep practicing my python, so why not practice it on something that I love, like basketball! I don’t know how regularly I plan on posting but we’ll see how we go!

At the time of writing the 2018/19 NBA season has just kicked off, and I thought what better way to start a season than to look at previous seasons’ failures.

As we all know, shooters shoot. So I thought it would be interesting to look at the players over the last three seasons who meet three criteria:

The player must have played over the average amount of minutes played over these three seasons The player must have attempted over the league average of three point attempts over these three seasons The player must have a three point percentage under the league average over these three seasons

Once we have looked through our data to see which players meet all three criteria, then we will know who truly shoots their shot.

Firstly, we will load our dataframe. I will be using data obtained from www.basketball-reference.com for the seasons 2015/16, 2016/17 and 2017/18.

Easy peasy. As you can see there are numerous stats for each row, and all of them are pretty self explanatory. But for the purposes of this blog, there are a few columns that we will be focusing on. Firstly, we need to calculate the average three point attempts for the league over the span of our dataframe.

Firstly, I used the .mean() method tho calculate the average value for the ‘3PA’ column, which tells us that the league average over this three season span was just shy of 117 3 point attempts, with this value being stored within the ‘three_pt_avg’ variable. I then realised that syntactically the ‘3PA’ column name is a bit of a nightmare for our use, so used the .rename() function to rename the column to ‘Three_Point_Attempts’. Finally, we search for all rows that have more three point attempts than our ‘three_pt_avg’ variable, and display these rows.

Then, we do the same for the three point percentage for the league across these three seasons, again using the .mean() function. Using this method, we see that the league average is around 30%. Then we find all players that meet both criteria, by storing all rows within the dataframe that contain players that have both shot more three pointers than the average player in the league, but whose three point percentage is less than league average.

The last criteria then is to select all players than have played more minutes than the league average. After the previous step we were left with 61 rows of data. However, only 52 of these had played over the average amount of minutes! Lets name and shame these guys!

Isaiah Thomas Justin Anderson Mario Hezonja Wesley Johnson Anthony Morrow Jameer Nelson Josh Smith Rashad Vaughn Charlie Villanueva

Poor Isaiah. Man can’t catch a break. Obviously it is a little unfair to call these guys out. When calculating the league average in minutes, we are counting every single players minutes, regardless of how many three point shots/makes they had, so we are including traditional NBA big men who have never even contemplated a three point shot. Add to this the fact that having looked through their individual stats, most of these guys are hovering ever so slightly below the league average 30%. Wesley Johnson’s 2016/17 season however is the outlier, having shot .246 from beyond the arc, despite his three point attempt rate being .590. All of this leads us to Johnson’s 8.4 player efficiency rating, rating nearly 7 points lower than a league average player.

But anyways, back to our guys who played more minutes than the league average…

I thought it would be interesting to take a look at the positions of each of our remaining 52 players, and produce a simple bar chart displaying these findings. With 20 recorded rows meeting our criteria, the small forward position has produced the most players that fit our criteria.

Finally, it occurred to me that there are probably repeat offenders within our remaining dataset. Guys who have done this more than once over the last three seasons! So using the .nunique() function, I see that of our 52 remaining rows, there are only 45 unique rows based on the ‘Player’ column, meaning that we do in fact have some repeat offenders.

To highlight these individuals and to see how many times they do appear in our results, I use the .duplicated() method and print, to give us the following list of names, and how many times over the last three seasons they have took and above average amount of three point shots, and made less than the league average.

Player Aaron Gordon 2 Corey Brewer 2 Marcus Smart 3 Randy Foye 2 Russell Westbrook 2 Stanley Johnson 2

There you have it. Marcus Smart has achieved this feat every year for the last three years, and I personally love the dedication to shooting his shot.

Thats all for now. If you’ve got this far, I applaud and appreciate you, and if you have any comments on what I’ve talked about here and would like to get in touch, please feel free either by the contact form on wordpress, my email justtheleagueminimum@gmail.com, or my twitter @minimum_league.

Thanks!

The League Minimum