NBA stats dataset
Description
To scrape NBA stats data from a website and analyze player performance using data visualization techniques
Summary
The goal of this project was to extract data from an NBA stats website using web scraping techniques and then perform data analysis to create visualizations using Python. The website used was "https://www.basketball-reference.com/", which contains data on players and teams in the NBA. The code for this project can be found on my GitHub repository at "https://github.com/Duggsdaddy/Srihith_I310D.git".
The data was extracted using the BeautifulSoup library in Python, and the data was stored in a Pandas DataFrame. The data was cleaned and processed to remove any unnecessary columns or rows, and the data types of the columns were checked and corrected where necessary.
The data was analyzed using various Python libraries such as Matplotlib, Seaborn, and Plotly to create visualizations like bar graphs, line graphs, and box plots. The visualizations were used to identify trends and patterns in the data.
The project follows ethical web scraping practices by not overwhelming the website with too many requests and by giving proper attribution to the website as the source of the data.
Overall, this project demonstrates how web scraping and data analysis techniques can be used to extract meaningful insights from data available on the internet.
Here's a data dictionary for the table
- Player: string - name of the player
- Pos (Position): string - position played by the player
- Age: integer - age of the player as of February 1, 2023
- Tm (Team): string - team the player belongs to
- G (Games Played): integer - number of games played by the player
- GS (Games Started): integer - number of games started by the player
- MP (Minutes Played): integer - total minutes played by the player
- FG (Field Goals): integer - number of field goals made by the player
- FGA (Field Goal Attempts): integer - number of field goal attempts by the player
- FG% (Field Goal Percentage): float - percentage of field goals made by the player
- 3P (3-Point Field Goals): integer - number of 3-point field goals made by the player
- 3PA (3-Point Field Goal Attempts): integer - number of 3-point field goal attempts by the player
- 3P% (3-Point Field Goal Percentage): float - percentage of 3-point field goals made by the player
- 2P (2-Point Field Goals): integer - number of 2-point field goals made by the player
- 2PA (2-point Field Goal Attempts): integer - number of 2-point field goal attempts by the player
- 2P% (2-Point Field Goal Percentage): float - percentage of 2-point field goals made by the player
- eFG% (Effective Field Goal Percentage): float - effective field goal percentage of the player
- FT (Free Throws): integer - number of free throws made by the player
- FTA (Free Throw Attempts): integer - number of free throw attempts by the player
- FT% (Free Throw Percentage): float - percentage of free throws made by the player
- ORB (Offensive Rebounds): integer - number of offensive rebounds by the player
- DRB (Defensive Rebounds): integer - number of defensive rebounds by the player
- TRB (Total Rebounds): integer - total rebounds by the player
- AST (Assists): integer - number of assists made by the player
- STL (Steals): integer - number of steals made by the player
- BLK (Blocks): integer - number of blocks made by the player
- TOV (Turnovers): integer - number of turnovers made by the player
- PF (Personal Fouls): integer - number of personal fouls made by the player
- PTS (Points): integer - total points scored by the player