Skip to content

guides / NBA

How to analyze NBA play-by-play data: one real game

We turned the 481-row play-by-play of Bucks at 76ers (Nov. 21, 2026) into possessions, per-100 ratings and lineups. The steps, and what the box score missed.

StatPro10 min read

One game: Bucks at 76ers, November 21, 2026 (2026-27 regular season). Data checked

On this page

The short version

  • Analyzing NBA play-by-play takes four steps: check the log against the box score, split it into possessions, convert points to per-100 ratings, and group possessions by lineup.
  • In Bucks at 76ers on November 21, 2026, we counted 99 possessions for Milwaukee and 100 for Philadelphia. Basketball-Reference's box-score formula gives 99.1 for the same game.
  • Milwaukee took 101 shots to Philadelphia's 88 and had no more possessions. The extra shots came from 15 offensive rebounds and from Philadelphia shooting 37 free throws.
  • Philadelphia's starting five was outscored 50 to 40 in 17.4 minutes of a game the 76ers won 132-129. Only the play-by-play shows that.
  • Check lineup tracking against box-score plus-minus. Ours matched 12 of 20 players on the first pass and all 20 after one fix to how free throws are assigned.

To analyze NBA play-by-play data, you do four things in order: check the log against the box score, split it into possessions, turn points into per-100-possession ratings, and group the possessions by who was on the floor. We ran all four on one game, the Milwaukee Bucks at the Philadelphia 76ers on November 21, 2026.

The log is 481 rows long. It ends 132-129 for Philadelphia, with Tyler Herro scoring 50 in the loss.

We expected the possession count to be the payoff. The earlier version of this post, like most guides, treated it as the step that separates play-by-play from a box score. So we counted, and got 99 possessions for the Bucks and 100 for the 76ers. Then we ran Basketball-Reference's box-score formula on the same game and got 99.1. The box score already knew.

So here is what we'll argue. A box score is the total at the bottom of a receipt, and for one game that total is right more often than people who build pipelines like to admit. What the log adds is the order the items were rung up in, and who was working the register. In this game that is the gap between "Philadelphia won by three" and "Philadelphia's starters lost their minutes by ten." We'll take the four steps on this one log, show where each one bit us, and finish with which of them we would do again.

What a play-by-play log contains

Each row is one event with a period, a clock, a running score and the players involved. Ours had 481 of them, 55 of which were substitutions. What no raw log gives you is a column for the five players on the floor or a marker for where one possession stops. You build both.

We meant to use the pbpstats package for that, since its documentation says it "adds lineup on floor for all events" and "fixes order of events for some common cases in which events are out of order." It reads the NBA's own endpoints, and those refused our requests on November 22. So we took the same game from ESPN's public summary feed and wrote the parser ourselves, about 300 lines of Python. The upside is that every problem below is one we hit ourselves.

Step 1: Check the log against the box score

We expected this step to be a formality. Add up the rows, compare with the box score, move on.

The log against the box score
Bucks at 76ers, November 21, 2026
StatBox scoreRows in the log
Points, Bucks129129
Points, 76ers132132
Shot attempts, Bucks101101
Shot attempts, 76ers8889
Free throw attempts, both teams5555
Offensive rebounds, both teams2231
Defensive rebounds, both teams6971
ESPN game summary feed and StatPro box score, read November 22, 2026

Points matched, which is the least you should ask of a log. The rebounds did not, and the miss was large: 31 offensive rebound rows against 22 in the box score. Nine of those rows are "team rebounds," which the feed writes when nobody secures the ball: after a missed first free throw, a blocked shot that goes out of bounds, a heave at the buzzer. Count them as rebounds and Philadelphia nearly doubles its offensive rebounding for the night.

The extra shot attempt was one play. Tyrese Maxey threw a heave with 0.4 seconds left in the first quarter. The log has it as a missed shot, his twelfth attempt, and the box score lists him at 4 of 11. If your shooting numbers come from summing shot rows, he shot worse in your file than he did in the official record.

The log is right in both places by its own rules. It keeps different books from the box score, and you only find that out by adding up a game before you trust a season.

Step 2: Build possessions

A possession ends on a made shot, a defensive rebound, a turnover, or a made final free throw. An offensive rebound extends the possession, which is how the NBA Stats glossary treats it too. The trouble is in the exceptions, and this game had all of them: five Philadelphia baskets with a foul and one free throw to follow, two technical free throws that put a point on the board with no possession attached, two heaves at the end of a quarter, and a last Milwaukee inbound with 1.5 seconds left that never became a shot.

Our count came to 99 for Milwaukee and 100 for Philadelphia. The teams alternated possessions without a break in every quarter, which is the check we'd run on any parser.

Then came the part we didn't go looking for. Basketball-Reference estimates possessions from the box score alone with a formula its glossary describes this way: it "estimates possessions based on both the team's statistics and their opponent's statistics, then averages them." We had always read that averaging as a patch. Fed this game's box score, it returns 99.1. A count that took us 300 lines of code and every free-throw edge case above differed from the formula by less than one possession.

What the count did give us was a correction to the box score's most tempting line. Milwaukee took 101 shots to Philadelphia's 88, and 13 extra shots reads like 13 extra chances. It wasn't. The Bucks had no more possessions than the 76ers.

Their extra shots came from 15 offensive rebounds, which are second tries inside a possession they already had, and from Philadelphia finishing so many of its own trips at the line instead of with a shot. The second tries did not pay, either. Bucks possessions that included an offensive rebound scored at a lower rate than the ones that did not.

Bucks possessionsCountPoints
With an offensive rebound1316
Without one86113

Step 3: Turn points into per-100 ratings

With possessions counted, the ratings are division.

One game, per 100 possessions
Bucks at 76ers, November 21, 2026
TeamPointsPossessionsPoints per 100
Philadelphia 76ers132100132
Milwaukee Bucks12999130.3
Our count from the ESPN play-by-play, read November 22, 2026

The table says the three-point margin was an efficiency margin of less than two points per 100, on nearly identical possessions. It does not say Milwaukee has a 130 offense. The Bucks came in at 1-15 and average 109.4 points a game on StatPro's team page, so one night's rating describes the night. That is the limit of this step for a single game, and it is why we stopped expecting much from it.

Step 4: Who was working the register

This is the step a box score cannot do at all, so it is the one that needs checking most. We rebuilt the five players on the floor for every row from the substitutions, then tested the result against the plus-minus column in the box score. On the first pass 12 of 20 players matched, and the other eight were each off by exactly one point.

All eight traced to two free throws, one at 6:41 of the second quarter and one with 12 seconds left in the game. In both, the log lists substitutions between the first and second shot, and the official plus-minus charges both shots to the players who were on the floor when the foul happened. We changed our rule to match and all 20 players lined up. If we had skipped the check, every lineup number below would have been slightly wrong and we would not have known.

We assumed the lineups would say what the standings say: a 13-3 team's starters beating a 1-15 team's starters.

The three lineups that played five minutes or more
Score is the lineup's points first, then the opponent's
LineupMinutesPossessions on offenseScore
Bucks starters20.54147-51
76ers starters17.43540-50
76ers: Embiid, Edgecombe, Caldwell-Pope, Simons, Walker7.71730-23
Our lineup tracking from the ESPN play-by-play, read November 22, 2026

Philadelphia's starting five of Joel Embiid, Maxey, LeBron James, VJ Edgecombe and Kentavious Caldwell-Pope was outscored 50 to 40. The margin came from a group that played under eight minutes, the same five with Anfernee Simons and Jabari Walker in for James and Maxey, which won its stretch 30 to 23. The box score hints at this (Edgecombe is plus 10, Maxey minus 5) but it cannot tell you which five were together when it happened.

Step 5: The minutes Herro sat

The last thing a log lets you do is cut the game by situation, and the cut we wanted was the simplest one. Herro scored 50 and finished plus 1 in a three-point loss, so the Bucks lost the time he sat by four. He sat twice. Milwaukee won the first stretch, the opening 6:19 of the second quarter, 17 to 16.

The second was the first 1:52 of the fourth quarter. Milwaukee missed four jump shots, Dominick Barlow scored all five Philadelphia points, the Bucks called timeout down 103-92 and Herro came back. He scored on Milwaukee's next two possessions.

It is tempting to say those 112 seconds lost a game decided by three. We won't. It was three Bucks possessions, and a log cannot tell you why a coach rested a player or what would have happened if he hadn't. What it can tell you is where to look, and that is more than the 50 in the box score does. The same caution applies to any cut by score or clock: pick the cutoff before you look, say what it was, and report how many possessions fell inside it.

If you would sooner read finished numbers than build this, StatPro's NBA stats pages and NBA player pages carry season results, and Ask StatPro takes a question in plain words. For the habits that follow from this game, Recent games vs season average is about how much one night should move you, and Rebound chances vs rebounds is the player-level version of the team-rebound problem in Step 1.

FAQ

Where can I get NBA play-by-play data? The pbpstats package reads the NBA's stats.nba.com and data.nba.com endpoints and adds lineups and possessions for you. Those endpoints refused our automated requests on November 22, 2026, so this post used ESPN's public game summary feed, which carries the full event list and the box score in one file.

Do I need play-by-play to calculate offensive rating? Not for a team in a single game. Basketball-Reference's team possession formula needs only field goals, free throws, rebounds and turnovers for both teams, and here it landed within one possession of a full count. You need play-by-play when the question is about a lineup, a player's time on and off the floor, or a stretch of the game.

Why does my possession count differ from another site's? Usually because of end-of-quarter possessions and free throws. We counted two buzzer heaves as possessions and left out a 1.5-second inbound; a site that makes either choice the other way will be one or two off for this game, and neither count is wrong.

How many possessions does a lineup need before its rating means something? One game cannot answer that, and this one shows why. The most-used lineup on either side had 41 possessions, and the best team in the East by record got a rating from its starters that it will not keep.

What we'd do again

We came in thinking the possession count was the reason to open a play-by-play log. For one game, we no longer think so. The receipt total was right: a formula that never saw the log matched our count, and the ratings built on it told us little the final score had not.

What we would do again is the first step and the fourth. Adding up the log against the box score found the team rebounds and the heave before they reached any number we published. Rebuilding the lineups, and testing them against plus-minus, found the one thing in this game a box score could not say: the starters lost their minutes and the margin came from somewhere else.

Before a game, we'd open the last box score, read the plus-minus column for starters against bench, and only then decide whether the log is worth pulling. If the box-score possession estimate starts missing a hand count by three or four across a run of games, then counting matters more than we have said here, and we'll change this post.

Play-by-play and box score for Bucks at 76ers, November 21, 2026, from ESPN's game summary feed, read November 22, 2026, and checked against the StatPro box score the same day. Possession, lineup and on-off figures are our own counts from that log.

Try it on StatPro

Bucks at 76ers box scoreThe box score and plus-minus column this post checks its play-by-play against.

In this article

Sources