Graphing NBA player and team stats using matplotlib
Project description
NBAGrapher
NBA Grapher is a python script that can make plots and graphs of NBA comparing various statistical measures of NBA players and teams
NBA Grapher uses sportsreference for scraping data from basketball-reference and creates plots using matplotlib
Currently, four types of graphs are supported.
- Player stat by season
- Player stat by game
- Team stat by season
- Team stat by game
Details on each of these functions can be found in the full documentation
A full list of avaiable statistics for each function can be found here.
Installation
NBAGrapher can be installed from PyPi using PIP
$ pip install nbagrapher
Examples
Season based
- VORP of two players throughout their career
nbagrapher.plot_player_season(['iversal01','bryanko01'],"value_over_replacement_player")
- PER of the last five MVPs over the last five years
nbagrapher.plot_player_season(['antetgi01','hardeja01','westbru01','curryst01','duranke01'],"player_efficiency_rating",start_year=2014,end_year=2019)
- Cumulative points of the five top points scorers over the last decade
nbagrapher.plot_player_season(['jamesle01','duranke01','hardeja01','westbru01','curryst01'],"points",start_year=2010,cum=True)
Game based
- Win Shares for January 2019
nbagrapher.plot_player_game(['embiijo01','antetgi01'],2019,"true_shooting_percentage",start_date=datetime.date(2019,1,1),end_date=datetime.date(2019,2,1))
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
NBAGrapher-1.0.0.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for NBAGrapher-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0af807192776774d598ae5cbd5a085225712b02cf20bb8979d8e165c2f3b7632 |
|
MD5 | cafddcfb66d1fb41a9706e362c3aa6d1 |
|
BLAKE2b-256 | be966b3353e66ac2e3fa9f280bb65b9d30d7891d6a14fc80d07948b9f8774c9e |