I was working through your shot probability notebook and noticed the LeagueAverages is there but the Shot_Chart_Detail is empty. I tried a few game_id's and same result.
league_id = '00' #NBA
player_id = '0' #All players
game_id = '1021900008'
season = '2018-19'
shots = player.Player(headers=HEADERS,
endpoint='shotchartdetail',
league_id=league_id,
player_id=player_id,
game_id=game_id,
season=season)
shot_df = pd.DataFrame(shots.data['Shot_Chart_Detail'])
shot_df.head(15)
print(shots.data)
{'Shot_Chart_Detail': [],
'LeagueAverages': [{'GRID_TYPE': 'League Averages',
'SHOT_ZONE_BASIC': 'Above the Break 3',
'SHOT_ZONE_AREA': 'Back Court(BC)',
'SHOT_ZONE_RANGE': 'Back Court Shot',
'FGA': 43,
'FGM': 2,
'FG_PCT': 0.047},
{'GRID_TYPE': 'League
...
Update: I did find some that work. i.e. the example in your location_data example
league_id = '00' #NBA
player_id = '0' #All players
game_id = '0021800699'
season = '2018-19'
shots = player.Player(headers=HEADERS,
endpoint='shotchartdetail',
league_id=league_id,
player_id=player_id,
game_id=game_id,
season=season)
shot_df = pd.DataFrame(shots.data['Shot_Chart_Detail'])
shot_df.head(15)
^ prints the shot_df
I was working through your shot probability notebook and noticed the LeagueAverages is there but the Shot_Chart_Detail is empty. I tried a few game_id's and same result.