← Back to list
1. Using

analyzing-nba-stats
by KevinGastelum
⭐ 0🍴 0📅 Jan 18, 2026
SKILL.md
name: analyzing-nba-stats description: Fetches and processes NBA player and team statistics. Use when the user wants to analyze basketball data for the sports picker model.
Analyzing NBA Stats
When to use this skill
- User asks for "player props" or "recent form" for NBA players.
- User wants to analyze "box scores" or "advanced metrics" (PER, TS%, Usage).
- Integrating new NBA data sources into the
modelcomponent.
Workflow
- Source Selection: Decide between
nba_api(Python wrapper for stats.nba.com) or external scraping if needing prop betting odds. - Normalization: Map Player Names to IDs consistently. Handle "J. Brown" vs "Jaylen Brown".
- Data Frame Creation: Always load data into a Pandas DataFrame for analysis.
- Feature Engineering: Calculate rolling averages (last 5 games, last 10 games) as these are crucial for betting models.
Instructions
1. Using nba_api (Python)
The model directory is likely where this code lives.
from nba_api.stats.endpoints import playergamelog
import pandas as pd
def get_player_last_n_games(player_id, n=5):
# Season '2023-24' needs to be dynamic
log = playergamelog.PlayerGameLog(player_id=player_id, season='2024-25')
df = log.get_data_frames()[0]
return df.head(n)
2. Key Metrics for Betting
Focus on these stats for prop bets:
- PTS, REB, AST: Standard props.
- Minutes Played: High correlation with output.
- USG% (Usage Rate): Good for predicting high-scoring games.
3. Rate Limiting
stats.nba.com is strict.
- Add user-agent headers if making raw HTTP requests.
- Implement delays between requests in loops.
Resources
Score
Total Score
40/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon