Giter Club home page Giter Club logo

bball-stats's Introduction

BBall Stats

Part 1: Historical Data + Analysis

All things change over time, and the NBA is no exception. When talking about two players from different eras, there seems to be no objective way to compare them. And not only have their been continuous advancements in medicine, training, nutrition, etc, but there have also been discrete rule changes at many points in NBA history.

Some people will bring up rules like hand-checking, but can we quantify how much such changes affect the NBA? Well, yes. This was the most simple part of this project. I went to basketball reference, copied their league history table, then added some more rows (like TS%, 3PAr, etc) and then made graphs of the resulting data. Super simple, and it showed clear trends that make sense given historical context of rule changes.

All this is found in the avgs by season.xlsx file in this repository. I learned teams play worse offensively in lockout seasons, that hand-checking's impact is statistically significant, and that offensive rebounding is somehow dying. Obviously, just looking at numbers is no use - it would be nice to figure out why these trends happened - but finding the trend has to come before finding the reason.

But then I wanted to compare players from different eras. This was possible, but I would have to individually go to each player's page, copy their table, put it in a CSV file, then run the SeasonParser file to compare their achievements with that year's average player. It was fun, but a lot of busy work. So I decided that it would be nice to be able to read from basketball-reference by simply calling a function. So that leads to part 2 of the project.

Part 2: Creating an API

I decided it would be best to copy from each teams page, as that is easier to do than find every player season link, and then issues with players who go to the ABA or miss a whole season, etc, occur. However, players who get traded mid season won't have their full stats taken into account, but that's a problem with parsing the player page anyway. I decided to store each of these TeamSeasons in a TeamSeason object, which each get saved to CSV.

bball-stats's People

Contributors

armaank1999 avatar

Stargazers

 avatar

Forkers

kaka4523

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.