espnscrapeR-data

August 6, 2021 · View on GitHub

This is a data-only companion to the espnscrapeR package.

Data are stored in the data folder, available as .csv only for now. Data will be added weekly and accessed via nflreadR.

However, they can always be read in manually as so:

### Season = 1x row season per QB
### Weekly = 1x row per week per QB in each season

# NFL
nfl_qbr_season <- readr::read_csv("https://raw.githubusercontent.com/nflverse/espnscrapeR-data/master/data/qbr-nfl-season.csv")
nfl_qbr_weekly <- readr::read_csv("https://raw.githubusercontent.com/nflverse/espnscrapeR-data/master/data/qbr-nfl-weekly.csv")

# College
nfl_qbr_season <- readr::read_csv("https://raw.githubusercontent.com/nflverse/espnscrapeR-data/master/data/qbr-college-season.csv")
nfl_qbr_weekly <- readr::read_csv("https://raw.githubusercontent.com/nflverse/espnscrapeR-data/master/data/qbr-college-weekly.csv")

QBR Explainer

Full details on total QBR as told by ESPN. ESPN provides these values publicly on their website at espn.com/nfl/qbr.

Examines all of a quarterback's contributions

ESPN’s Total Quarterback Rating (Total QBR), which was released in 2011, has never claimed to be perfect, but unlike other measures of quarterback performance, it incorporates all of a quarterback’s contributions to winning, including how he impacts the game on passes, rushes, turnovers and penalties. Also, since QBR is built from the play level, it accounts for a team’s level of success or failure on every play to provide the proper context and then allocates credit to the quarterback and his teammate to produce a clearer measure of quarterback efficiency.

Efficiency stat, not a value stat

This process of determining the EPA, dividing credit among the QB and his teammates and then determining the weight of play occurs for every play in which a quarterback is involved. All of these plays are then added together and divided by the total number of clutch-weighted plays to produce a per-play measure of QB efficiency.

That last piece is important! QBR is an efficiency stat similar to yards per play or yards per attempt.

Wikipedia also has some details on total QBR.

  • Each QB "action play" (passes, rushes, sacks, scrambles, or penalties attributable to the QB) is measured in terms of the expected points added (EPA)
  • Adjust for the difficulty of each play. EPA is adjusted based on the type and depth of a pass, and whether the QB was pressured.
  • If there is a completion, he only is credited for the typical number of yards after the catch (passer rating takes all yards into effect) based on the type and depth of the pass
  • There is a discount on garbage time, or a time where the score is out of reach near the end of the game.
  • Opponent adjustment: More credit is given with tougher defenses and vice versa.
  • QBR averages the adjusted EPA per play and transforms it to a 0 to 100 scale, with 50 being average.

QBR uses

QBR is a useful metric for evaluating quarterback efficiency. It is highly correlated with EPA (Expected Points Added), although ESPN's EPA formula is not directly equivalent to nflfastR/nflscrapR EPA model.

EPA is tightly correlated with QBR

This provides another useful metric for evaluating quarterbacks.

Of additional interest, as highlighted by Mike Sando during his time at ESPN, QBR is roughly predictive of observed win rate. In essence, the QBR metric is very close to the observed win rate.

QBR is predictive of Win Percentage QBR is related to Win Percentage

Data Dictionary

NFL Season

variableclassdescription
seasondoubleSeason
season_typecharacterSeason Type either 'Regular' or 'Playoffs'
game_weekcharacterGame Week will be "Season Total"" for season data
team_abbcharacterTeam name abbreviation
player_iddoubleESPN Player ID
short_namecharacterPlayer Short Name
rankdoubleQBR Rank
qbr_totaldoubleQBR Total score - Adjusted Total Quarterback Rating, which values the quarterback on all play types on a 0-100 scale adjusted for the strength of opposing defenses faced.
pts_addeddoublePoints added - Number of points contributed by a quarterback, accounting for QBR and how much he plays, above the level of an average quarterback
qb_playsdoubleQB plays - Plays on which the QB has a non-zero expected points contribution. Includes most plays that are not handoffs
epa_totaldoubleExpected Points Added - Total expected points added with low leverage plays, according to ESPN Win Probability model, down-weighted.
passdoublePass - Expected points added on pass attempts with low leverage plays down-weighted
rundoubleRun - Clutch-weighted expected points added through rushes
exp_sackdoubleEPA sacks - Expected points added on sacks with low leverage plays down-weighted
penaltydoublePenalty - Expected points added on penalties with low leverage plays down-weighted
qbr_rawdoubleRaw Total Quarterback Rating, which values quarterback on all play types on a 0-100 scale (not adjusted for opposing defenses faced)
sackdoubleQBR sack EPA
first_namecharacterQBs First Name
last_namecharacterQBs Last Name
namecharacterQBs Full Name
headshot_hrefcharacterHeadshot URL/href
teamcharacterTeam Full Name

NFL Weekly

variableclassdescription
seasondoubleSeason year
season_typecharacterSeason Type (either Playoffs or Regular)
game_iddoubleESPN Game ID
game_weekdoubleGame week (1-17)
week_textcharacterWeek text (includes text description)
team_abbcharacterQB Team Abbreviation
player_iddoubleESPN Player ID
short_namecharacterPlayer Short Name
rankdoubleQBR Rank
qbr_totaldoubleQBR Total score - Adjusted Total Quarterback Rating, which values the quarterback on all play types on a 0-100 scale adjusted for the strength of opposing defenses faced.
pts_addeddoublePoints added - Number of points contributed by a quarterback, accounting for QBR and how much he plays, above the level of an average quarterback
qb_playsdoubleQB plays - Plays on which the QB has a non-zero expected points contribution. Includes most plays that are not handoffs
epa_totaldoubleExpected Points Added - Total expected points added with low leverage plays, according to ESPN Win Probability model, down-weighted.
passdoublePass - Expected points added on pass attempts with low leverage plays down-weighted
rundoubleRun - Clutch-weighted expected points added through rushes
exp_sackdoubleEPA sacks - Expected points added on sacks with low leverage plays down-weighted
penaltydoublePenalty - Expected points added on penalties with low leverage plays down-weighted
qbr_rawdoubleRaw Total Quarterback Rating, which values quarterback on all play types on a 0-100 scale (not adjusted for opposing defenses faced)
sackdoubleQBR sack EPA
first_namecharacterQBs First Name
last_namecharacterQBs Last Name
namecharacterQBs Full Name
headshot_hrefcharacterHeadshot URL/href
teamcharacterTeam Full Name
opp_iddoubleOpposing team ESPN ID
opp_abbcharacterOpposing team abbreviation
opp_teamcharacterOpposing team full name
opp_namecharacterOpposing team team name
week_numdoubleWeek numeric