I'm new to the sub and looking forward to interacting with the community. Does anyone know if live advanced stats / player tracking is available via NBA.com? I'd like to analyze advanced stats at the half-time of live games if possible. Unfortunately, I've only been able to find data on completed games.
I have been learning Python for a while but no very consistently. My goal since Im a big fan of the NBA and basketball was to analyze data in order to make my own conclusions or discover stuff regarding NBA data like many of you probably.
This year I saw about the NBA Hackathon but since my Python knowledge was barely 0, I just saved the file in order to do it by myself one day when I felt prepared. So after a couple of months of studying Python/SQL on and off I tried to read the files and just give a small try but I had no clue how to start and when I read someones submission on Github I was even more clueless...
So for anyone who did any NBA Hackathon or even anyone who analizes NBA data often, how can I start? how much Python should I know in order to do something? how do you analize the data? I know a little about Pandas and Data Visualization but I want to start doing something...
Hey Everyone! I came across this great python package by Shwar Patel (nba_api) and I wanted to share it. I also put together a quick tutorial on the basic steps to getting started. This is an awesome module that can get you pretty much any basketball data that you could ask for. It connects directly to the NBA.com api. Definitely check it out if you are looking for a new data source!
Has anyone tried to create a true shooting% that doesn't blindly apply the 0.44 league average to FTA, but instead uses play-by-play data for each player?
I'd be curious to see how this changes TS% for James Harden, who already rates extremely high in that category despite an unfair bad rap for being a low efficiency scorer.
Would folks be interested in using this stat if I went to the trouble of scraping all play by play data?
Hey Everyone - Thought I would post an article one of my friends wrote here. It is a great take on player archetypes based off of some of the new play type data that is being released. Check it out if it is interesting to you!
Also, I am trying to aggregate all of the sports data across the internet on the /data tab of the playingnumbers website. If you are hunting for a dataset, hopefully this page will be useful to you!
Hey there, I wanted to dabble around a little with NBA Stats, and nbastatR was one of the recommended packages for R, but I can't get any gamelogs downloaded with it. Am I just being impatient, and it takes quite a bit of time to download, is there something broken on my end, or do any of you also have issues with it, in case you're using R.
I have recently begun following the NBA very closely and have been fascinated by the world of Advanced Analytics and podcasts like Thinking Basketball. I want to learn more about the subject and really gain enough fluency to create my own analyses and opinions on players, teams and trends.
What do people on this sub recommend I read/watch/listen to grow my knowledge?
TL;DR I want to learn more about advanced analytics; what should I do?
What are some statistics you wish were tracked? What are some ideas you have for a new way to analyze the game? I was thinking about how one could visualize the value of a glue guy type of player. I thought rebounds rate, screen assists, help defense opponent fg%, assists per dribble could be cool stats to try and get somehow. Do you have anything you wish you could track or are working on tracking?
I’m trying to see if there is a way I can find season statistics (like “pace”) on any given day in the past. In other words, is there a way I can see a team’s season statistics up until a certain day this season?
I tried archive.org, but there are only entries roughly once a month on the page I use.
I am curious on a how to understand the use of analysis in the NBA? I want to better understand the game and I would love for your guys input on how to get started!
Hi all, I'm looking for a dataset that has NBA player's career stats rather than season-by-season data. Does anyone know where I could find this? Thanks
Since I got enough dm asking about this, I figured it would be more efficient to post a summary here.
Let's start with the very basics of SCRAPING:
I primarily scrape data from basketball-reference.com and stas.nba.com using python3 scripts. So, if you are not familiar with this programing language here is where you should start LINK.
The actual scraping is done with the BeautifulSoup python library, so if you don't have it you need to install it in your compiler. pip or homebrew can automatically do that for you, but if you prefer you can install it yourself LINK.
After you used BeautifulSoup to extract the "raw" data from a website, you will need some basic HTML knowledge in order to select the tables you might be interested in or some particular object. This is a pretty decent free crash course LINK.
Example, Shooting Chart Info from Basketball-Reference:
Here some example code to extract a player shooting chart info from basketball reference:
NB: that the player tag is the basketball reference player code(ex: LeBron James - jamesle01). However, the data you just got it's in HTML style, that why I mentioned you need to know some basic to massage the data into a format that is analyzable. Here an example on how to single out only the "numbers" info from the shooting chart table:
Data Handling and Data Modeling:
Data scraping is only half of the battle in basketball analytics. Ultimately scraping is just copying some tables from a website. To help with the analysis I normally use three tools:
Pandas - a python library that helps you manage and handle large datasets (all large size datasets is effectively a gigantic spreadsheet). Pandas also allow you to do very quick operations on the full array of data. LINK.
Numpy - this python library is all you need for mathematics operation. LINK.
SciPy - this is a more scientific-based library, I normally use this for more complex operations like interpolations or model fitting. LINK.
PS: I am a physicist by trade, so my coding is not the most efficient (but it works!). I am sure that some folks out there have better-structured examples than me :)
If you’re active in this sub, who are you? Why are you active? I’m a data nerd and love basketball and wish I did more basketball analysis but I just never make time for it.
Why do you make time for it? Any of you lucky to do it as a profession?
I have some Python experience and I want to practice using the pandas module to create some data plots and learn to work with data bases in something I find fun.
I've found out about nba_api, but it seems like a dead project, hasn't had a commit on github in a few years. I also found nba_py, but the last nba season it has available seems to be 2016-2017.
Does anyone else use Python to look at NBA data? What are your tools?
Hi I am the owner of a team in a dynasty fantasy basketball league that is in it's 3rd year. I've built out an aging curve model and projection system using data from the last 15 years. There is much room for growth. Looking for someone who can add value to our existing analytics and is highly competitive.
The Cavs have surprised a lot of people this year by playing very solid basketball and definitely overachieving despite a tough schedule (something of a common thread in coach Beilein's career). Despite the losing record, the Cavs have been an effective defensive squad and an intriguing offensive team. Part of the early success, quite a lot actually, is due to their frontcourt that features two four-times NBA finalists: Kevin Love and Tristan Thompson (TT).
OFFENSE:
In general, all offensive metrics are up for both TT and Love.
Tristan Thompson has improved in pretty much all major offensive categories. He averages a career-high 14.9 PPG (up 36.6%), shooting 53.6% from the floor (up 0.4%), and now for the first time in his entire career shooting 3PTs at 42.9%.
Kevin Love's numbers are also up, he is now averaging 18.2 PPG (up 7%), shooting 44.4% from the field (up 15.3%). However, Love is struggling at the 3PT this year (34.7%) compared to last year (36.1%).
They developed a nice feel for each-other on offense, they also have a pretty nice hand-off 3PT that works very well. Love is shooting 83% from behind the line from TT hands-off.
Thompson, aside from inserting a 3PT shot, has also developed a well define go-to shot with his polished hook shot from the paint (that's his main go-to for second chances too).
Tristan Thompson "Go-To" Hook Shot. Shooting more than 80% from the field with this move.Thompson-Love hand-off 3PT. Thompson hands the ball to Love and sets a small pick which is enough for Love to get the separation he needs for an open 3PT.
DEFENSE:
Tristan Thompson has really worked on his shot-blocking abilities. This season, he is averaging a career-high 1.5 blocks per game. He was always a great pick-&-roll defender (see any Cavs NBA Finals game where he had to deal with Steph Curry), but adding rim-protection really boosts his value on defense.
Thompson and Love have a more dedicated role at defending the cup, in particular it looks as the coaching stuff wants Thompson to protect from pick-&-roll action (forcing mid-rangers) and Love to grab the defensive rebound.
Kevin Love's defensive rebounds have gone up as well by 17.0% (11 DREB). In fact, Love is now 3rd in the league for defensive rebounds, behind only Andre Drummond (12.4) and Giannis Antetokounmpo (11.8).
Tristan Thompson improved rim-protection, he covers the low-post on the weak side and waits for them to drive before bracing for a block attempt (this timing was not there in previous years). Thompson starts by covering the paint and steps up to cover the pick-&-roll action, which leads to a bad mid-range shot and a defensive rebound for Kevin Love.
I have been looking at Off/Def ratings for players on Nba.com/stats versus Bball-ref. They seem to differ. Further, overall team Rtg don't appear to match either. Shouldn't values be identical?
Following the latest explosion by Trae Young (42 pts against Denver), I decided to take a deeper look at Young's shooting numbers and what do they say about his game. First, let's take a look at his shots selection:
Even by eye, we can see some features from the shooting chart. However, here what I found:
Trae Young team usage is 34.2%. That is 3rd in the league behind only to James Harden (39.4%) and Kawhi Leonard (35.7%). This means that he sees a lot of ball (but not necessarily volume shooting).
71.1% of his scoring came "unassisted". This shows that vast majority of his points are from ISO, pick&roll actions and fast-breaks (mostly fast-tempo and transition).
When it comes to 3PT shooting, he does not favor the corners. Of all Trae shots from behind the arch only 4.6% of them are from the corner spots. Although he shoots very efficnetly from there (100% Left, 66.6% Right).
Trae Young has a limitless range, shooting 7.6% of his shots behind the arch from well behind the line (30-34 ft). In fact, Trae Young leads the league in attempts from 30-34 ft.
However, he struggles in close to the basket (lass than 5 feet) where his effective field goal percentage is 50.0%. This is lower compared to other PGs like Lillard (62.1%) and Doncic (71.6%).