Introduction to NBAloveR

“This is package was made for people who just like the name, LOVE the NBA/Basketball in general. This package grabs data from basketball reference, one of the biggest data bases for basketball that just about everyone uses to tell their friends when theyre wrong. You can also grab info from nbadraft.net and RealGM”


Installing and Loading

“You can install”NBAlovers" with functions install.packages() and load it with library. I also downloaded some other packages to show off some graphs "


NBAloveR: Overhead View


“NBAloveR datasets like the HallOfFame where it shows you the year the player was inducted and the position said player was inducted under. Many of us probably have no idea who basketball players in the dataset below are. If you hit the right arror key you’ll see the reason they were inducted into the Hall of Fame. Some of these datasets are”players" and “frachise” which show you all the info of franchises and players from the NBA’s inception to 2018."

Functions in NBAloveR


“There are a couple differnt functions you can use in NBAloveR but I’m gonna show two. First being the”statsCompare" function which everyone loves cause who doesnt love comparing players without context and just the numbers they put up in their respective careers? The function automatically makes a line graph for you."


“For this example I picked the 4 best shooters of all time, this chart shows a players PPG at their age. With Ray Allen and Reggie Miller retired you started to see declines in their careers as they aged passed 30 which is to be expected. Are we to expect the same thing from Curry?”

Functions in NBAloveR(Part 2)

“So another interesting function is getTeamSalary() which shows the salary of any team for the next couple of years. Basketball players per year earnings increase because of the deal the NBA players made with owners where they make a percentage of money more each year because of earnings the NBA pulls in every year. This shows that while Curry is entering old age in basketball terms he stil going to make quite a bit of money. If you want to learn what Bird Rights are I would just google it.”

Manipulating Dating

#example provided by Koki Ando #retrieved from http://kokiando.hatenablog.com/entry/2018/09/10/121855

“There are many ways you can go about manipulate date and going with the last example of using Salary we can do things like make pie charts to see who is taking the biggest chunk of the pie.”


“My biggest problem with this chart is that Andrew has too big of a portion and is almsot getting paid more than the second best player when hes a 4th option at best and because he takes such a big chunk it makes it harder to sign quality bench players but I digress.”

Key Take aways and Weaknesses

“Overall, the package works decently well for an API thats free. You can see the weakness for a package like this. First off, it doesnt get updated often, it hasnet been updated in two years. You cant mainpulate a lot of functions the way you want to. First example of this, is the player comparisons, when you try and show other stat lines that you want to compare you cant. It only does PPG and you can add an age function and if you dont want use that it shows you a per year, which looks messy. The API does give you a lot of information by using very easy to use functions which is a great strength but youre limited on how you can manipulate that data.”

Work Cited

http://kokiando.hatenablog.com/entry/2018/09/10/121855

This is the creators page and showed us how to make the pie graph. He used different than I did but the same team because I was already raving about Steph Curry who plays for Golden State. He also shows different wasy to manipulate the data but warning some of the functions on that page arent even in the package anymore.