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 LiveBoxscoreItem or DataNbaBoxscoreItem items, typically from a boxscore data loader
data

returns dict with boxscore items split up by player and team

player_items

returns list of player boxscore items

player_name_map

returns dict mapping player id to player name

player_team_map

returns dict mapping player id to team id

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
data

returns boxscore data dict

live Boxscore Item

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

Bases: object

Class for boxscore items from live data endpoint

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
data

returns boxscore data dict

total_seconds

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
data

returns boxscore data dict