Boxscore

Boxscore

The Boxscore class has some basic properties for handling boxscore data

class pbpstats.resources.boxscore.boxscore.Boxscore(items)[source]

Bases: pbpstats.resources.base.Base

Class for boxscore items

Parameters

items (list) – list of either StatsNbaBoxscoreItem or DataNbaBoxscoreItem items, typically from a boxscore data loader

property data

returns dict with boxscore items split up by player and team

property player_items

returns list of player boxscore items

property player_name_map

returns dict mapping player id to player name

property player_team_map

returns dict mapping player id to team id

property team_items

returns list of team boxscore items

data.nba.com Boxscore Item

class pbpstats.resources.boxscore.data_nba_boxscore_item.DataNbaBoxscoreItem(item, team_id=None, team_abbreviation=None)[source]

Bases: object

Class for boxscore items from data.nba.com

Parameters
  • item (dict) – dict with boxscore stats from response

  • team_id (int) – (optional) team id is not in dict with stats and can be added in here

  • team_abbreviation (str) – (optional) team abbreviation is not in dict with stats and can be added in here

property data

returns boxscore data dict

stats.nba.com Boxscore Item

class pbpstats.resources.boxscore.stats_nba_boxscore_item.StatsNbaBoxscoreItem(item)[source]

Bases: object

Class for boxscore items from stats.nba.com

Parameters

item (dict) – dict with boxscore stats from response

property data

returns boxscore data dict