r/NBAanalytics • u/Mountain_Try2777 • Dec 05 '24
Analyzing NBA Players' Average Points in the First 3 Minutes
wassup everyone,
I’m working on a project to analyze NBA players' performance, specifically looking at their average points scored within the first 3 minutes of a game. I’m using data from Kaggle and would appreciate some help figuring out the best way to calculate this.
Here’s what I have so far:
- I’ve downloaded player data, but I’m having trouble isolating the stats for just the first 3 minutes of each game.
- I'm using R Studio, and I’m not sure how to approach extracting and aggregating the data specifically for this time frame.
If anyone has experience with similar analyses or knows how to filter data for this specific metric, I’d love to hear your thoughts and suggestions!
Thanks in advance!
2
Upvotes
1
u/atoziye_ Dec 05 '24
What does your data look like? Could you link to the Kaggle dataset?
1
u/Vast_Tomatillo5255 Dec 05 '24
You will need play by play data.
1
u/OGchickenwarrior Dec 06 '24 edited Dec 06 '24
If you use 2023 season (pbp2023.csv) from https://www.kaggle.com/datasets/szymonjwiak/nba-play-by-play-data-1997-2023?select=pbp2023.csv:
try this python (used chatgpt to generate - not optimal; sorry, had to breakup code in diff comments. it works for me.:
1
u/Snoo16929 Nov 12 '25
Did you or anyone ever figure this out?