BOXTOP Information

Boxtop Flexible Basketball Boxscore Format

This format is designed to allow storage of multiple boxscores in a single file.
The concept for this format is loosely based on Retrosheet's baseball "Box Score Event Files" (BSEF format: see Retrosheet for details) but has been adapted for basketball.

What follows is a list of identification fields. Anything listed in ALL CAPS is variable data. The .csv files created by boxtop.pl strictly follow this format, but that is not required. Tools written to parse this format should be written such that the order of the fields does not matter (except in rare cases), and missing fields must be tolerated.


1. Format fields


gamebxt (sentinel to denote the start of a new boxscore)
version,NUMBER (NUMBER always 1 for now)

2. Information fields


info,date,MONTH/DAY/FOURDIGITYEAR
info,dayofweek,DAY OF THE WEEK
info,gamenumber,GAME NUMBER (defaults to 1, and usually omitted, unless set to 2 if a second game was played between the SAME teams on the same day)
info,rteam,ROADTEAMFULLNAME
info,hteam,HOMETEAMFULLNAME
info,title,OPTIONAL USE FOR PLAYOFF GAMES (example: 1964 NBA Finals Game 1)
info,arena,ARENA
info,city,CITY
info,state,STATE
info,country,COUNTRY
info,attendance,ATT
info,ref,REFEREE NAME (one line per referee)
info,starttime,00:00PM
info,timezone,ET/CT/MT/PT
info,radio,RADIO INFORMATION
info,tv,TELEVISION INFORMATION
info,note,MISC NOTES ON THE BOXSCORE OR THE GAME
info,prelim,NON-NBA GAME THAT PROCEEDED OR FOLLOWED THIS GAME (if applicable)
info,event,SPECIAL EVENT (e.g. Bob Cousy Day, etc.)
info,techs,TECHNICAL FOULS (more efficient to list here instead of in the individual player and coach statistics lines if the data is not proofed)

3. Coach fields


coach,rteam|hteam,ID,FIRSTNAME,LASTNAME,TECHNICALFOUL

Note that "rteam|hteam" means that either rteam or hteam must appear in that location

ID = first five letters of last name, first two letters of first name, then a unique two-digit number (01, 02, etc.) that distinguishes players who have the same first/last name but are different people.
This format matches the page format used by Basketball-Reference.com, so if you use the same id, you can link directly to that site as follows:
http://www.basketball-reference.com/coaches/c.html where id is 99 if the coach never played professionally, or matches their player id.


4. Player statistics fields


stat,rteam|hteam,player,ID,FIRSTNAME,LASTNAME,MIN,FGM,FGA,FTM,FTA,3FGM,3FGA,PTS,OREB,REB,AST,PF,BLOCKS,TURNOVERS,STEALS,TECHNICALFOUL

ID = first five letters of last name, first two letters of first name, then a unique two-digit number (01, 02, etc.) that distinguishes players who have the same first/last name but are different people.
This format matches the page format used by Basketball-Reference.com, so if you use the same id, you can link directly to that site as follows:
http://www.basketball-reference.com/players//.html

A blank indicates that that statistic is not available.


5. Team statistics fields


tstat,rteam|hteam,MIN,FGM,FGA,FTM,FTA,FG3M,FG3A,PTS,OREB,REB,AST,PF,BLOCKS,TURNOVERS,STEALS,TEAMREBOUNDS,TECHNICALFOUL

6. Linescores (quarter-by-quarter results)


linescore,rteam|hteam,Q1,Q2,Q3,Q4,[OT],[OT2],...,:,FINAL

If you only know the final score (which for pro games are obtainable from several sources) then you can shorten the format as follows:
linescore,rteam|hteam,FINAL


7. Special sentinels

sources,LIST OF SOURCES

playoffsstarthere ("playoffs start here" - introduced for ABA boxscores where it was more useful to have a sentinel to separate regular season from playoffs)

ignore,ITEM TO IGNORE (but may be useful future reference or as a "TO DO" item.)

abatiebreaker (This game will be excluded from player and team totals on the statistics pages, but WILL be included in playoff game logs and splits. Place AFTER gamebxt for the game.)

pointsscoredbyopponent,rteam|hteam,FG,TOTALPOINTS,player,points,player,points...(player list is optional and currently unused) (Used in cases where a player scored points for the opposing team)


This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

Web page created at 19:42:59 on 09/08/2014 using ABAboxtopinfopage.pl based on boxtop format data, (c) 2010-2014 Michael Hamel.

Recommended Citation: The information used here was obtained free of charge from and is copyrighted by the Basketball BOXTOP Project.

Major Sources: The Sporting News (TSN), Basketball-Reference.com, RememberTheABA.com, and http://webuns.chez-alice.fr/home.htm (W, referenced by APBR.org).