NBA -- Home vs Away

NBA -- Home vs Away

Purpose of Code

These were the first steps to my NBA project. When I first started this project I decided to use statMuse because it was the easiest website to scrape away vs home games from. The purpose of this code was to just compare their home stats vs their away stats to see if they play better under pressure or worse. Of course, this can be easily done by just looking at their stats, however this was a great project to further my understanding of web drivers and scrapers.

Running the Code

Prompt:

What Player: (abbreviations and misspellings accepted):

Output interpretation:

Percent change of home vs. away stats:

  • Positive value: Player performs better at away.

  • Negative value: Player performs worse away.

Example:

Conclusion

Overall this was one of my first big projects I worked on using Selenium and BeautifulSoup, so it was a great learning experience. However, this doesn't give any real statistical analysis so I've decided to add on the code to give it some statistical value that you can't just find from the front page of Google.

Stay tuned for the expanded version of this project where I will be using Z-Score and standard deviation to find statistical anomalies in player data!

https://github.com/AdeelSyed897/NBA_Stats/blob/main/NBA.py