A package for scraping data from basketball-reference.com and stats.nba.com to provide opponent-adjusted statistics.
Project description
Defense Adjusted NBA Stats
This is a package that collects data from basketball-reference.com and stats.nba.com and provides endpoints that adjust a player's statistics depending on their opponents defensive strength.
Why adjust stats?
Numbers at face-value don't always tell the full story. For example, if player A scores 30 points on 50% from the field, and player B scores 27 points on 47% from the field, we could come to the conclusion that player A had a better scoring game.
However, what if player B faced one of the best defensive teams in the league, and player A faced a mediocre defensive team? How does that change how we view those performances?
This package attempts to provide a more even playing field with statistics by using the opponent team's defensive to adjust a player scoring and efficiency. For more details about how stats are "adjusted", see the methodology here.
Stats from basketball-reference for this package go back to the 1970-71 season, and stats from nba-stats only go back to the 1996-97 season.
Read the full documentation for this API here.
Installing
Via pip
Install using the following command:
pip install dans
Via GitHub
Or, you can clone this repo to a Git repository on your local machine.
License & Terms of Use
API Package
The dans package is Open Source with an MIT License.
NBA.com
NBA.com has a Terms of Use regarding the use of the NBA’s digital platforms.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dans-1.1.1.tar.gz.
File metadata
- Download URL: dans-1.1.1.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5283ab3643a9241e8c657815f9881d6531d41a288a14ffdb693a83cd903d2ae5
|
|
| MD5 |
9fdf958f7e19f5fb4d00a8548c046250
|
|
| BLAKE2b-256 |
b1f9def67a071f1c7ce4af2446c25e73976695ae78bc188f0398d5910652a7a5
|
Provenance
The following attestation bundles were made for dans-1.1.1.tar.gz:
Publisher:
release.yml on oscarg617/dans
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dans-1.1.1.tar.gz -
Subject digest:
5283ab3643a9241e8c657815f9881d6531d41a288a14ffdb693a83cd903d2ae5 - Sigstore transparency entry: 274299036
- Sigstore integration time:
-
Permalink:
oscarg617/dans@957018c63e629f9bae11c4fc7456c580e4d8d6c9 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/oscarg617
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@957018c63e629f9bae11c4fc7456c580e4d8d6c9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dans-1.1.1-py3-none-any.whl.
File metadata
- Download URL: dans-1.1.1-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91577ed83180b38c39d02c0699118869bffb371f37e740d14df29405e0ed13a5
|
|
| MD5 |
6f7602a6025e2132b19b4fcfd2468bf5
|
|
| BLAKE2b-256 |
c56081335bf3a237bf4ddf69a6619bc80db23fe94b72b26abdd75e03a6c756b7
|
Provenance
The following attestation bundles were made for dans-1.1.1-py3-none-any.whl:
Publisher:
release.yml on oscarg617/dans
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dans-1.1.1-py3-none-any.whl -
Subject digest:
91577ed83180b38c39d02c0699118869bffb371f37e740d14df29405e0ed13a5 - Sigstore transparency entry: 274299049
- Sigstore integration time:
-
Permalink:
oscarg617/dans@957018c63e629f9bae11c4fc7456c580e4d8d6c9 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/oscarg617
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@957018c63e629f9bae11c4fc7456c580e4d8d6c9 -
Trigger Event:
release
-
Statement type: