This interactive web application enables users to explore NBA player statistics to gain insights for sports betting decisions. Users can input an NBA player name and a rival team, then view visualizations of that player's recent performance trends overall and specifically when playing against the selected rival team.
The app retrieves NBA player data from the stats.NBA.com API. It allows selecting a player like LeBron James and a rival team like the Celtics. The user can choose which stats categories to visualize like points, rebounds, blocks, etc.
Interactive visualizations are then generated such as:
- Line plots showing the player's selected stat totals over recent games this season.
- Bar charts summarizing the player's average statistical outputs from their last 5 games.
- Shot charts indicating the player's shooting percentages from different court locations.
- Comparison line plots contrasting the player's stats when playing the rival team vs their season averages.
These visualizations enable quickly identifying performance trends, hot/cold streaks, potential matchup weaknesses, scoring efficiency by shot location, and more useful insights. The app provides an intuitive interface to access rich NBA data analytics for gaining an information edge when sports betting. Users can leverage the tool to determine strategic wagers based on visualized player vs opponent statistical profiles and trends.
The code demonstrates integrating the NBA API, Pandas, Matplotlib, Seaborn, and Plotly to build a practical data visualization web application with Streamlit in Python. The project has significant room for additional features and improvements as well.