rd11490 / nba_tutorials Goto Github PK
View Code? Open in Web Editor NEWTutorials for processing nba data
License: MIT License
Tutorials for processing nba data
License: MIT License
As I konwed, NBA.com and basketball-reference.com have differrent way to calculate the possessions. NBA.com use the play-by-play data, and basketball-reference caclulate it from traditional box. However, results of them are very close. The results of this project are mostly close to the NBA.com. But there are big deviation in some game. The game is such one with GAME_ID equaling to '0021801167' . The possession numbers of three way are as follow:
This project: 110.5
NBA.com: 105
basketball-reference.com: 108 (score/ORtg)
I don't konw if I make some mistake in the calcullation.
In FAQ of NBA.com, it says that a player or team’s base statistics are updated simultaneously with the game and in real time. The advanced stats are updated between 10-15 minutes after a game finishes.
To make the project support the real time analysis, are you concerned about changing the way of getting the players who played in a period?
Thanks for your work, I can try to calculate rapm, but I still don't understand how to calculate the lucky adjusted rapm, I understand the basic principle, but how to implement it in rapm, how to get the data?
EVENTMSGACTIONTYPE =38 is the type of 5 Second Inbound turnover. It is a team turnover which will impact the calculation of possession.
73 periods = players_subbed_in_at_each_period['PERIOD'].drop_duplicates().values.tolist()
Sometimes the game has no substitutions, which may miss the period.
periods = play_by_play['PERIOD'].drop_duplicates().values.tolist()
This avoids the problem.
hello,
i tried exactly the same as you say. i'm getting the error "NameError: name 'extract_data' is not defined".
client = urllib3.PoolManager()
season = "2019-20"
frame = extract_data(client, player_stats_url(season)) !! in this step i get the error.
am i missing something?
In some games, EVENTMSGACTIONTYPE don't tell you if it is a player rebound or team rebound, because EVENTMSGACTIONTYPE is always 1.
Like '0011700070'
I went through the play-by-play parser tutorial to get my pbp data in a way that it's ready to calculate RAPM. But, in the RAPM tutorial you have an extra binary column for possession
that I'm not sure how you derived. If you could share any insights on that, that'd be great!
I am looking at the later tutorial based around analyzing the play by play data which redirects me to this page to create a play-by-play scraper. But, this one seems to be just for substitutions, and just for one game. Do you have a file or a tutorial that shows how to scrape data from an entire season? I am somewhat new to coding so it may already be plainly out here for me to see, but I am missing it. I am just looking for a reliable way to scrape season data every week or so to stay updated. Sorry if this question wastes your time if the answer is very obvious.
There is a sample way of using API of NBA.com to return the the players playing in initial seconds of period, like this api to return the start of 1st period:
https://stats.nba.com/stats/boxscoretraditionalv2/?gameId=0041700404&startPeriod=0&endPeriod=14&startRange=10&endRange=240&rangeType=2
startRange must be setted to greater than 0.
In rapm_possessions.csv, there are at least 46 rows where Hassan Whiteside (playerid 202355) is listed in two different columns. For example, row 60919 has this property. It looks like they're from Heat-Jazz games. Is this shorthand for a situation where all but 4 players fouled out/were injured? I haven't been able to check whether this happened.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.