How much is the NBA dollar worth in terms of team success?
This is the recommended way to use this project.
git clone https://github.com/marcolagos/NBADollarAWin.git
python -m venv NBADollarAWin_env
Windows
NBADollarAWin_env/Scripts/activate.bat
MacOS
source NBADollarAWin_env/bin/activate
Once the virtual environment is activated, you can install packages using pip, and they will be installed only in the virtual environment, not globally on your machine. Use the following command:
pip install -r requirements.txt
When you're finished working in the virtual environment, you can deactivate it using the following command:
deactivate
General Description: Given a year and given all the values of the relevant x variables for a specific team during that year's season, predict the number of wins that that specific team will receive in that season.
- Remove asterisks from team name
- Standardize column names
- Flip nba_team_wins to have a team column and call this new dataframe variable "wins_long".
- Remove the Unnamed empty columns (that have "NA" value for every element in its column) in any dataset.
- Unit Normal Scaling for both x variables and y variables
- Adjust the salaries according to CPI not GDP Deflator
the mean, standard deviation, minimum, maximum, and quartiles for each variable.
- multicollinearity
- mean of every x variable
- variance of every x variable
- mean of the y variable
- variance of the y variable
- for every x variable, make a plot of the mean of that x variable across the 20 years. If possible, in this plot, you can also draw a vertical line which represents one standard deviation in that x variable in that year.
- correlation coefficients to examine the relationships between variables
- Call the pairs() function to visualize the multicollinearity between every pair of x variables.
- For every year, plot the number of wins over number of 3PT attempts for each team
- Use the lm function to get the beta coefficients for each of the plots and plot those lines on the plots
- Create a vector of beta coefficients and plot the vector over corresponding 20 years
- use the lm function on the vector of beta coefficients and years and plot that line on the plot from step 3
- Take note of any jumps in the impact of 3PT shots and attribute it a reason such as a player or shift in team paradigms.