About CourtSketch
What is CourtSketch?
CourtSketch is your ultimate destination for deep-dive NBA analytics and visualizations. It's a platform designed for basketball enthusiasts, analysts, and anyone who loves to explore the intricacies of the game through data. We offer a rich suite of tools—over 40 distinct graphing utilities—that transform complex player and team statistics into clear, engaging, and insightful visuals.
Whether you're looking to dissect shot patterns with detailed shotmaps, understand player impact through on/off-court statistics (WOWY), analyze team rotations, or explore financial aspects like player salaries and team payrolls, CourtSketch aims to provide fast, comprehensive information in a fun and interactive way.
Our tools cover a wide range of analytical needs, from individual player performance (scoring efficiency, playmaking, hustle stats) to team-level dynamics (playtype frequencies, defensive schemes, lineup effectiveness), and even live game data analysis.
The Origin Story
It's a bit of a story. I started closely following the NBA again 3 years ago, enthralled by the brilliant community of film & data analysts that made up NBA twitter. I ended up joining the Thinking Basketball discord server to discuss the NBA at higher frequency, and I noticed that an inordinate amount of time was spent pulling statistics from different vendors to analyze players. At first, my goal was just to create a discord bot ("BasketBot") that would automate this process for said community and present the information in a (hopefully) useful manner. (Fun fact, the first iteration of the bot didn't even serve images, all of the information was sent via ASCII tables!)
Then the bot started becoming more popular, and as it became more popular, people began having more detailed requests and I found myself continually inspired to create visuals aligned with these requests. The `explainers.md` file, which originally served as the guide for BasketBot, documents many of these early commands and their functionalities. It just kind of kept growing, and by the end of 2023, I found myself with a discord bot that served 40+ different types of graphics. I found myself often joking that I had built a web app as a discord bot, and commenting on how absurd it was I had decided to design all of this around text commands instead of clickable links.
This summer, I committed to finally building the actual web app—CourtSketch. And naturally, true to form, a day before the start of the 2024-25 season, I finished this first iteration. The Flask application (`app.py`) now powers this platform, integrating everything from Google OAuth and email/password authentication to Stripe for premium subscriptions.
I have no idea what this will amount to, if it will amount to anything. What I do know is that I have poured a ton of myself into creating it, and that it's time to roll the dice and see if I can build a platform for myself.
I hope you enjoy it.
Explore Our Suite of Tools
CourtSketch offers a diverse range of free and premium tools to satisfy your basketball analysis cravings. Here's a glimpse of what you can explore:
Player Analysis
- Shotmaps & Shooting Profiles: Visualize individual player shot charts, dribble-based shot splits, jump shot tendencies, shot zone efficiency, and 3-point shooting profiles.
- Performance Metrics: Analyze scoring efficiency, playmaking abilities, hustle stats, and even "ballhog" tendencies.
- Playstyle & Impact: Explore Synergy playtype breakdowns, tracking data visualizations, and LEBRON-based impact cards.
- Trends & Comparisons: Track player performance trends and compare players head-to-head on various metrics.
Team & Lineup Analysis
- Team Performance: Dive into team scoring patterns, shot zone analyses, 3-point strategies (offensive and defensive), and overall playstyle spreads.
- Lineup Dynamics: Uncover the effectiveness of 5-man lineups, player pairings, and analyze on/off court impact with WOWY stats and TeamShift visuals.
- Rotations: Visualize game-specific and seasonal rotation patterns.
- Matchup Analysis: Explore defensive matchups and height comparisons.
Game Day Insights
- Live & Post-Game: Access live game accounting, detailed play-by-play data with video links, game-specific shotmaps, and comprehensive game reports.
- Video Clips: Find specific game moments using the clip finder functionality, a feature evolved from BasketBot.
Financial & Cap Tools
- Salary Analysis: Compare player salaries, view team payroll breakdowns, and understand contract values relative to player impact (e.g., LEBRON-based WAC).
- Draft Assets: Visualize team draft pick ownership.
Unlock More with Premium
Elevate your analysis with our premium features, offering even deeper insights:
ShotCombos
Think 'WOWY for ShotCharts'. This powerful tool (available at `/shotcombo`) allows you to visualize shot data for any combination of players on/off the court for a specific team, spanning over 25 years of data. Whether you're analyzing how a lineup performs with specific player combinations or comparing shot tendencies, ShotCombos provides a number of different lenses to analyze scoring patterns and team/player success. It's one of the features that requires a subscription to access.
Team & Player Series Analysis
Track and analyze team tendencies (`/teamseries`) and individual player performance (`/playerseries`) throughout an entire playoff series. These tools help uncover game-to-game strategic adjustments, shifts in shooting tendencies, and how players adapt their game to opponents, comparing their playoff output to regular-season averages. Access to these detailed series breakdowns is a premium feature.
Career Ranks
The Career Ranks tool (available at `/career_rank`) tracks and compares a player's performance over the past 12 years across multiple key metrics. This allows you to chart their development throughout their career and better contextualize where they land within the landscape of modern & historical basketball. This is a premium offering.
Advanced Game & Lineup Breakdowns
Premium users also get access to detailed game reports (`/gamereport`), in-depth game rotation visualizations (`/gamerotation`), and advanced lineup breakdown tools (`/lineup-breakdown`) to further dissect team strategies and player contributions.
Predicted FAQ
Why is it throwing an error when I try to create a graph for this player/team?
Generally speaking, there are a few common reasons:
- Data Availability & Latency: While most stats are called from locally saved databases, some features (like WOWY and TeamShift mentioned in `explainers.md`, and certain live data functionalities in `app.py`) rely on external connections or real-time data fetching, which can occasionally experience bumps or delays.
- Inclusion Cutoffs: Many graphs have minimum thresholds for inclusion (e.g., games played, minutes per game) to ensure meaningful comparative performance. If a player or team has limited data for the selected period, they might not meet these cutoffs. For example, some player trend tools might require a minimum number of games.
- Development Bugs: I am a one-man operation, and this is a lot of code. If you encounter errors for a player or team that seems like they should meet the criteria, please reach out! It helps me identify and fix problems.
- Data Span: Some visualizations have specific historical data spans. For instance, LEBRON-based metrics generally go back to around 2009-2010, while tracking stats are typically available from 2014 onwards, as indicated in `explainers.md`. Ensure your selected season falls within the tool's supported range.
If an error occurs for a team, it's almost always a development bug on my end. Please let me know so I can fix it.
How frequently is the data updated?
The application uses a combination of historical datasets (e.g., `data/schedule.csv`, `data/index_master.csv`) and connections to live or regularly updated sources for things like play-by-play data and game day stats. Historical data is generally static for past seasons, while current season data aims to be as up-to-date as possible, often relying on sources like `cdn.nba.com`.
How can I reach you?
The email for the site is nbavisuals1@gmail.com, and my Twitter handle is @GabeLeftBrain. If you have any questions, suggestions, or points of concern, please contact me through either.