Every play is one row. The agent reads eighteen columns of it.
Behind the scenes the plays are one CSV file: about a quarter of a million lines of plain text, downloaded from nflverse and cut down by a small script. Nobody should need a terminal command to look at a file like that, so this page reads it for you: which columns survived the cut, every play of last week's games, and how many plays there are.
The cut: 372 columns to 18
Each play in the download has 372 columns: down, distance, the players, the weather, the play's description in words, and more. The agent's question needs 18 of them. Six of the others are betting lines. Those are not hidden from the agent; they are gone: the file it can reach does not have them.
Yellow is kept. Pink is a betting line, struck out. Everything else was left behind because the question never needs it, not because it is harmful.
The eighteen, one by one
What each column means, with its value on one real play from last week.
seasonThe season the game belongs to, 2021 through this one.season_typeREG for the regular season, POST for the playoffs. The filter behind "regular season" and "playoffs".weekThe week of the season. The playoffs continue the count, up to 22.game_idOne id per game: season, week, away team, home team.game_dateThe date the game was played.home_teamThe home team, by abbreviation.away_teamThe away team.posteamThe team with the ball on this play. Empty on rows that are not a play, such as the end of a quarter or a timeout.resultThe home team's score minus the away team's at the end of the game. Positive means the home team won; 0 is a tie, which the tool drops. This is how the tool knows who won.game_halfHalf1, Half2, or Overtime. The filter behind "first half only".qtrThe quarter, 1 to 4, and 5 for overtime.down1 to 4. Empty on kickoffs, extra points, and rows that are not a play.play_typeWhat kind of play it was: run, pass, punt, kickoff, field_goal, extra_point, qb_kneel, qb_spike, or no_play for a penalty that wiped the play out.rush_attempt1 if the play was a run, a quarterback scramble included. This is the column the tool counts.pass_attempt1 if the play was a pass, sacks included.qb_kneel1 when the quarterback knelt. A kneel counts as a run in the data, and it is not a decision to run, so the tool drops it.qb_spike1 when the quarterback spiked the ball. The same: it counts as a pass, and the tool drops it.score_differentialThe score of the team with the ball minus the other team's, as the play began. The filter behind "within 8 points" at the snap, and behind the halftime score, which the tool reads from the first play of the second half.Read a game
Every play of last week's games, in the order they happened, in the eighteen columns above. Pick a game.
Gray rows are the ones the tool's play filters remove (filters 4 and 5 in its list): kickoffs, punts, kicks, penalties that wiped the play out, kneels, spikes, and rows with no team in possession. Yellow marks a run. The two lines above are the count the tool makes for each team: runs, passes, and the share that were runs.
How many plays
By season
| Season | Games | Weeks | Plays |
|---|
By kind of play
If you want the file itself
It is a CSV: plain text, one play per line, commas between the columns. Any spreadsheet program opens it, and so does a terminal. These are the commands the show would otherwise have run on screen.
# in episode-1/ of the repo head -3 data/plays-slim.csv # the header and two plays wc -l data/plays-slim.csv # how many lines ./fetch-data.sh # download the seasons again and redo the cut