#hide
from shot_chart.core import *
This file will become your README and also the index of your documentation.
pip install shot_chart
We first create a pandas dataframe from the source data.
shots_2019 = make_df(untar_data(URLs.SHOTS_2019))
list_teams(shots_2019)
0 New Orleans
2 Toronto
203 LA Lakers
204 LA Clippers
369 Houston
371 Washington
563 Utah
724 Detroit
896 Charlotte
897 Sacramento
1076 Minnesota
1077 Philadelphia
1248 New York
1250 Orlando
1418 Oklahoma
1419 Portland
1587 Phoenix
1588 Golden State
2117 Dallas
2307 Memphis
2309 Chicago
2649 Denver
3000 Brooklyn
3874 Milwaukee
4562 San Antonio
5436 Indiana
5606 Boston
5951 Atlanta
6863 Miami
6864 Cleveland
Name: team, dtype: object
list_team_players(shots_2019, 'Portland')
houston = TeamShots(shots_2019,"Houston")
houston.plot_shots()

houston.plot_shots(date_range=((2020,1,3), (2020,1,11)))

Please check the extra options when using the plotting functions
portland_20191125 = TeamShots(shots_2019,"Portland")
portland_20191125.list_game_ids(2019,11,25)
portland_20191125.plot_shots("201911250CHI")

player_shots = PlayerShots(shots_2019,"Anthony Davis")
player_shots.plot_shots()

dlo = PlayerShots(shots_2019,"D'Angelo Russell")
dlo.plot_shots()

dlo.plot_shots(distance_limit=(16,26),attempt="2-pointer")

dlo.plot_effective(most_or_least="most")

dlo.plot_effective(most_or_least="most",exclude=["0ft"])

dlo.plot_effective(most_or_least="most",min_shots="auto",exclude=['2ft'])

dlo.plot_effective(most_or_least="least")

dlo.plot_effective(most_or_least="least",min_shots="auto")
