Trash talk has always been a part of NBA culture — from iconic rivalries to viral social-media moments. But one question rarely gets answered analytically:
Does trash talk actually change how players perform — in the moment, in the days after, or in the games that follow?
This project transforms narrative beefs, media controversies, player-to-player conflicts, and rivalry moments into quantifiable data.
It blends basketball psychology, storytelling, advanced statistics, and real NBA game logs to uncover how emotions, ego, and public narratives shape performance on the court.
A multi-scenario analytics project exploring how NBA beefs, conflicts, and narrative moments influence on-court and off-court player performance.
This project analyzes whether NBA trash talk, beefs, conflicts, and rivalry moments have a measurable impact on player performance.
Using a custom-processed dataset extracted from narrative descriptions, the analysis evaluates five distinct scenarios:
- Scenario A: In-game impact
- Scenario B: Short-term performance impact (Before/After)
- Scenario C: Off-court narrative momentum
- Scenario D: Internal team conflict effects
- Scenario E: Rivalry duels and head-to-head behavior
This is a full data analysis case study designed as a portfolio project, featuring a complete preprocessing pipeline, custom feature extraction, visual analytics, and scenario-based conclusions.
-
Clone the repository:
git clone [https://github.com/yourusername/nba-trash-talk-project.git](https://github.com/yourusername/nba-trash-talk-project.git) cd nba-trash-talk-project -
Create environment:
pip install -r requirements.txt
-
Set up API keys:
- Rename:
env_example/env.example→.env - Fill in your OpenAI API key:
OPENAI_API_KEY=YOUR_KEY_HERE
- Rename:
-
Launch JupyterLab:
jupyter lab
Open the notebooks in
/notebooksand run them sequentially.
beef_raw_descriptions: Contains paragraph-style descriptions of NBA beefs, trash talk moments, altercations, team drama, and media-driven conflicts.
01_parse_beef_paragraphs.ipynbextracts:- Player names, conflict dates, and event types
- Teams involved and narrative context
02_classify_beef_events.ipynbassigns each event to one of the five scenarios based on narrative cues, keywords, temporal context, and type of interaction (player-player, internal team, public beef, etc.).
The resulting files used for analysis include:
beefs_scenario_A_in_game_impact.xlsxbeefs_scenario_B_short_term_performance.xlsxbeefs_scenario_C_off_court_narrative.xlsxbeefs_scenario_D_internal_team_conflict.xlsxbeefs_scenario_E_rivalry_duel.xlsx(...and several derived metric files.)
A key utility, find_anchor_game_and_windows(player, beef_date, window_size), aligns each beef event with:
- The closest NBA game
-
$N$ previous games (window before) -
$N$ next games (window after)
The inspect_anchor_for_row() utility is used to debug alignment quality.
- Goal: Evaluate player performance in the same game where the beef happened.
- Metrics analyzed: Points, assists, rebounds, Usage rate, Game Score, and Delta vs. baseline seasonal averages.
- Main takeaway: Some players respond with short-term spikes in aggression, but performance delta was often negligible. In-game beefs rarely produce meaningful statistical changes.
- Goal: Measure performance changes in the games immediately before and after the beef event.
- Approach: Anchored game alignment (prev/next windows), short-term deltas, and dumbbell plots.
- Key finding: Receivers of trash talk often win more despite slight performance declines. Initiators frequently experience frustration, leading to noticeable performance drops. This produced one of the strongest storytelling insights of the project.
- Goal: Analyze "off-court moments" (interviews, media beefs, etc.) and connect them with performance momentum curves.
- Techniques: Momentum score calculation, heatmap of positivity/negativity.
- Notable finding: Some massive performance swings aligned exactly with well-known media events (e.g., public criticism, viral interviews). Heatmaps clearly showed negative dips aligning with controversial moments.
- Goal: Examine conflicts within the same team and assess their effect on the conflicted player and overall team performance.
- Findings: Several team conflicts resulted in noticeable drops in momentum and short-term performance. Visualizations confirmed narrative descriptions of mismatched expectations between teammates.
- Goal: Analyze head-to-head rivalry matchups and how conflicts affect their next encounters.
- Findings: Some rivalries showed consistent patterns where one player improves after conflict, while the other declines. These results supported deeper storytelling used throughout the project.
Each scenario contains dedicated notebooks with:
- Histograms and momentum curves
- Heatmaps and dumbbell plots
- Comparative tables and anchor-window visual checks
(Plots are generated but stored in ignored folders (outputs/ and plots/) to keep the repository clean.)
Across all scenarios, the project shows several key insights:
-
Trash talk effects vary dramatically by personality type.
- Some players thrive under pressure or conflict.
- Others lose momentum, especially in rivalry or public narrative cases.
-
Receiver vs. Initiator asymmetry.
- Receivers often maintain or increase win rates and show stable stats.
- Initiators sometimes overreact, force shots, and drop in efficiency. This strongly supports the storytelling angle introduced in Scenario B.
-
Off-court events matter.
- Certain media events correlated strongly with momentum dips, confirming that narrative and psychology intertwine with performance.
-
Rivalries shape performance trails.
- Head-to-head patterns reveal long-term narrative effects not visible in single games.
The project intentionally blends: structured NBA data, narrative descriptions, scenario modeling, and psychometric interpretations. The result is a unique portfolio case study showcasing multi-angle reasoning.