Skip to main content

NFL — additional Python functions — NFL Pro: nfl_ngs–scrape_ngs

nfl_ngs_statboard_leaders​

nfl_ngs_statboard_leaders(season: 'int' = 2024, season_type: 'str' = 'REG', week: 'Optional[int]' = None, return_as_pandas: 'bool' = False)

NGS cross-stat "leaders" board, stacked long with a category column.

Wraps /api/statboard/leaders, which bundles several short top-N lists of mixed shape (fastestBallCarriers, fastestSacks, longestCompletions, highestSeparation, rushYardsOverExpected, completionPctAboveExpected, avgYACAboveExpected). Each list is normalized separately and concatenated diagonally (union of columns; missing cells become null), with a category column recording which board each row came from.

Parameters

ParameterTypeDefaultDescription
seasonint2024season year.
season_typestr'REG'"REG", "POST", or "PRE".
weekint | NoneNoneoptional single-week filter.
return_as_pandasboolFalsereturn a pandas frame instead of polars.

Returns

A polars (or pandas) DataFrame stacking every leader list, with a category column. Empty frame if no lists are present.

col_nametypedescription
categoryStringBroader category of player positions
leader_esbIdStringESB (NFL's Enterprise Subscriber Base) identifier for the player featured in the leader record.
leader_firstNameStringFirst name of the player featured in the leader record.
leader_gsisIdStringGSIS (Game Statistics and Information System) identifier for the player featured in the leader record.
leader_jerseyNumberInt64Jersey number of the player featured in the leader record.
leader_lastNameStringLast name of the player featured in the leader record.
leader_playerNameStringFull display name of the player featured in the leader record.
leader_positionStringPosition designation of the player featured in the leader record (e.g., 'QB', 'WR').
leader_positionGroupStringBroad position group of the player featured in the leader record (e.g., 'OFFENSE', 'DEFENSE').
leader_shortNameStringAbbreviated display name of the player featured in the leader record (e.g., 'P.Mahomes').
leader_teamAbbrStringTeam abbreviation of the player featured in the leader record (e.g., 'KC').
leader_teamIdStringNFL Shield team identifier for the team of the player featured in the leader record.
leader_weekInt64Week number associated with the weekly leader record.
leader_yardsInt64Yardage total associated with the featured leader statistic for this player.
leader_inPlayDistFloat64Distance (in yards) the player traveled while the ball was in play on the featured leader statistic.
leader_maxSpeedFloat64Maximum speed (in yards per second or mph) recorded by the player on the featured leader statistic play.
leader_headshotStringURL to the headshot image of the player featured in the leader record.
play_gameIdInt64NFL Shield API game identifier for the game this play belongs to.
play_playIdInt64NFL Shield API unique integer identifier for this play within the game.
play_sequenceInt64Sequential order integer of this play within the game as used by the NFL Shield API.
play_downInt64Down number (1–4) at the time of this play.
play_gameClockStringGame clock time remaining at the start of this play in MM:SS format.
play_gameKeyInt64NFL Shield internal game key integer identifying the game in internal API routing.
play_health_playerTrackingStringData quality status string for player-tracking data on this play (e.g., 'GOOD', 'PARTIAL').
play_health_ballTrackingStringData quality status string for ball-tracking data on this play (e.g., 'GOOD', 'MISSING').
play_homeScoreInt64Home team's score at the end of this play.
play_isBigPlayBooleanBoolean flag indicating whether this play was classified as a 'big play' by the NFL Shield API.
play_isEndQuarterBooleanBoolean flag indicating whether this play was the final play of a quarter.
play_isGoalToGoBooleanBoolean flag indicating whether this play occurred in a goal-to-go situation.
play_isPenaltyBooleanBoolean flag indicating whether a penalty was assessed on this play.
play_isSTPlayBooleanBoolean flag indicating whether this play was a special teams play.
play_isScoringBooleanBoolean flag indicating whether this play resulted in a score.
play_playDescriptionStringOfficial NFL text description of the play (e.g., '(2:11) J.Allen scrambles right end for 9 yards').
play_playStateStringStatus of the play record (e.g., 'FINAL', 'LIVE') in the NFL Shield API at time of capture.
play_playStatsInt64Serialized or encoded statistical detail for the play outcomes (e.g., yards, player IDs).
play_playTypeStringText label classifying the play type (e.g., 'PASS', 'RUSH', 'PUNT') from the NFL Shield API.
play_playTypeCodeInt64Integer code corresponding to the play type classification in the NFL Shield API.
play_possessionTeamIdStringNFL Shield team identifier for the team that had possession during this play.
play_preSnapHomeScoreInt64Home team's score immediately before the snap of this play.
play_preSnapVisitorScoreInt64Visiting team's score immediately before the snap of this play.
play_quarterInt64Quarter number (1–4, or 5 for overtime) in which this play occurred.
play_timeOfDayUTCStringWall-clock timestamp in UTC at which this play occurred during the broadcast.
play_visitorScoreInt64Visiting team's score at the end of this play.
play_yardlineStringHuman-readable yardline string (e.g., 'DAL 22') indicating where this play began.
play_yardlineNumberInt64Numeric yard line (1–50 from nearest end zone) of the line of scrimmage at the snap.
play_yardlineSideStringTeam abbreviation indicating which team's side of the field the yardline is on.
play_yardsToGoInt64Integer yards needed for a first down on this play.
play_absoluteYardlineNumberInt64Absolute yard line number (1–100 from one end zone) of the line of scrimmage at the snap for this play.
play_actualYardlineForFirstDownFloat64Actual yard line marker needed for a first down on this play.
play_actualYardsToGoFloat64Exact decimal yards required for a first down on this play.
play_endGameClockStringGame clock time remaining at the end of this play in MM:SS format.
play_isChangeOfPossessionBooleanBoolean flag indicating whether this play resulted in a change of possession.
play_playDirectionStringDirection of the play (left, right, middle) as recorded in NFL Shield tracking data.
play_startGameClockStringGame clock time remaining at the moment this play began, in MM:SS format.
leader_timeFloat64Elapsed time value associated with the leader record, such as time of possession or time-to-throw.
leader_seasonAvgFloat64Season-to-date average of the featured leader statistic for this player.
leader_teamAvgFloat64Team-level average of the featured statistic across all players on the team.
aggressivenessFloat64Aggressiveness tracks the amount of passing attempts a quarterback makes that are into tight coverage, where there is a defender within 1 yard or less of the receiver at the time of completion or incompletion. AGG is shown as a % of attempts into tight windows over all passing attempts.
attemptsInt64The number of pass attempts as defined by the NFL.
avgAirDistanceFloat64Average air distance (in yards) the ball traveled on all pass attempts, from NFL Next Gen Stats.
avgAirYardsDifferentialFloat64Average difference between intended air yards and completed air yards per attempt, indicating whether the passer throws short or long relative to the targeted depth.
avgAirYardsToSticksFloat64Average air yards relative to the first-down marker on pass attempts, from NFL Next Gen Stats (negative = short of sticks, positive = past sticks).
avgCompletedAirYardsFloat64Average air yards on completed passes only, from NFL Next Gen Stats.
avgIntendedAirYardsFloat64Average intended air yards per pass attempt (including incompletions), from NFL Next Gen Stats.
avgTimeToThrowFloat64Average time in seconds from snap to throw for the passer, from NFL Next Gen Stats.
completionPercentageFloat64Percentage of pass attempts completed by the passer, from NFL Next Gen Stats statboard leaders.
completionPercentageAboveExpectationFloat64Passer's actual completion percentage minus their expected completion percentage based on target depth, coverage, and game context (CPOE), from NFL Next Gen Stats.
completionsInt64The number of completed passes.
expectedCompletionPercentageFloat64Model-predicted completion percentage for the passer based on depth of target, receiver separation, and coverage, from NFL Next Gen Stats.
gamesPlayedInt64Number of games played by the player in the given season or time period.
interceptionsInt64The number of interceptions thrown.
maxAirDistanceFloat64Maximum air distance (in yards) recorded on a single pass attempt by the passer, from NFL Next Gen Stats.
maxCompletedAirDistanceFloat64Maximum air distance on a completed pass for the passer, from NFL Next Gen Stats.
passTouchdownsInt64Total passing touchdowns recorded by the player in the given period.
passYardsInt64Total passing yards recorded by the player in the given period.
passerRatingFloat64NFL passer rating (0–158.3 scale) for the quarterback in the given period.
playerNameStringFull display name of the player associated with this NGS statboard leader record.
seasonInt644 digit number indicating to which season(s) the specified timeframe belongs to.
seasonTypeStringPhase of the season for this record (e.g., 'REG' for regular season, 'POST' for playoffs).
positionStringPrimary position as reported by NFL.com
teamIdStringNFL Shield team identifier for the team associated with this leader statistic.
player_seasonInt64NFL season year in which this player record is valid.
player_currentTeamIdStringNFL Shield team identifier for the player's current team.
player_displayNameStringPlayer's full display name as used by NFL Next Gen Stats (e.g., 'Patrick Mahomes').
player_esbIdStringESB (Enterprise Subscriber Base) identifier assigned to this player by the NFL.
player_firstNameStringPlayer's first name as recorded in the NFL Next Gen Stats player roster.
player_footballNameStringPlayer's preferred football name (may differ from legal first name) used on the field and in broadcasts.
player_gsisIdStringGSIS (Game Statistics and Information System) identifier, the primary NFL player identifier used across nflverse datasets.
player_gsisItIdInt64GSIS integrated tracking identifier, an alternate integer-form player ID used in the NFL Shield tracking system.
player_jerseyNumberInt64Player's jersey number as worn on the field.
player_lastNameStringPlayer's last name as recorded in the NFL Next Gen Stats player roster.
player_positionStringPosition of the player accordinng to NGS
player_positionGroupStringOfficial NFL position group for the player (e.g., 'OFFENSE', 'DEFENSE', 'SPECIAL_TEAMS').
player_shortNameStringAbbreviated player name used in display contexts (e.g., 'P.Mahomes').
player_statusStringPlayer's current roster status (e.g., 'ACT' for active, 'IR' for injured reserve).
player_uniformNumberStringPlayer's uniform number as a string, matching what appears on the jersey.
player_headshotString
player_smartIdStringNFL Smart ID — a system-agnostic unique identifier for the player used across NFL Shield systems.
player_ngsPositionStringPlayer's position as classified by NFL Next Gen Stats (may differ from official NFL position; e.g., NGS uses 'ILB' vs 'LB').
player_ngsPositionGroupStringBroad position group assigned by NFL Next Gen Stats (e.g., 'QB', 'WR', 'DB', 'DL').
avgCushionFloat64Average distance (in yards) between the receiver and the nearest defender at the snap, from NFL Next Gen Stats receiver tracking.
avgExpectedYACFloat64Average yards after catch expected based on game situation and receiver location, from NFL Next Gen Stats models.
avgSeparationFloat64Average separation (in yards) between the receiver and the nearest defender at the moment of catch or incompletion, from NFL Next Gen Stats.
avgYACFloat64Average yards after catch per reception, from NFL Next Gen Stats receiver tracking.
avgYACAboveExpectationFloat64Average yards after catch above statistical expectation (YAC - expected YAC), from NFL Next Gen Stats models.
catchPercentageFloat64Percentage of targets caught by the receiver, from NFL Next Gen Stats statboard leaders.
percentShareOfIntendedAirYardsFloat64Receiver's share (as a percentage) of the team's total intended air yards, from NFL Next Gen Stats.
recTouchdownsInt64Total receiving touchdowns recorded by the player in the given period.
receptionsInt64The number of pass receptions. Lateral receptions officially don't count as reception.
targetsInt64The number of pass plays where the player was the targeted receiver.
yardsInt64The number of receiving yards
avgTimeToLosFloat64Average time (in seconds) for the ball carrier to reach the line of scrimmage on rush attempts, from NFL Next Gen Stats.
expectedRushYardsFloat64Model-predicted rushing yards based on field position, personnel, and pre-snap alignment, from NFL Next Gen Stats.
rushAttemptsInt64Total rushing attempts by the player in the given period.
rushPctOverExpectedFloat64Percentage of rush attempts on which the player gained more yards than the model-predicted expectation, from NFL Next Gen Stats.
rushTouchdownsInt64Total rushing touchdowns recorded by the player in the given period.
rushYardsInt64Total rushing yards recorded by the player in the given period.
rushYardsOverExpectedFloat64Total rushing yards gained above statistical expectation (RYOE) in the given period, from NFL Next Gen Stats.
rushYardsOverExpectedPerAttFloat64Average rushing yards over expected per attempt (RYOE/attempt), from NFL Next Gen Stats.

Example

from sportsdataverse.nfl import nfl_ngs_statboard_leaders
bd = nfl_ngs_statboard_leaders(season=2024, season_type="REG")
bd["category"].unique().to_list()

nfl_ngs_yac_oe​

nfl_ngs_yac_oe(seasons: 'Union[int, Sequence[int]]', *, min_receptions: 'int' = 10, return_as_pandas: 'bool' = False, _loader: 'Optional[Callable[..., pl.DataFrame]]' = None) -> 'Union[pl.DataFrame, pd.DataFrame]'

YAC over expected per receiver-season, stabilised with EB shrinkage.

yac_oe_raw is the NGS-shipped avg_yac_above_expectation passed through unchanged (per-reception yards after catch minus the NGS tracking-model expectation). yac_oe_shrunk applies per-season Efron-Morris empirical-Bayes shrinkage toward the reception-weighted league mean, weighted by receptions, so small-sample extremes are pulled in. The shrinkage prior is fit at call time on rows with receptions >= min_receptions — no bundled artifact.

Parameters

ParameterTypeDefaultDescription
seasonsUnion[int, Sequence[int]]Season(s) to compute, 2016+.
min_receptionsint10Qualification threshold for the prior fit and for receiving a yac_oe_rank. Defaults to sportsdataverse.nfl.nfl_ngs_constants.MIN_RECEPTIONS.
return_as_pandasboolFalseIf True, returns a pandas DataFrame.
_loaderOptional[Callable]NoneInjectable loader for offline tests.

Returns

One row per (season, player_gsis_id) with raw + shrunk YAC-OE, reliability in [0, 1], and a dense descending yac_oe_rank over qualified rows (null for unqualified rows). Empty input returns a zero-row frame with the documented schema.

col_nametypedescription
seasonInt64NFL season (YYYY).
player_gsis_idStringPlayer GSIS identifier (nflverse id, e.g. "00-0036223"), pinned Utf8.
player_display_nameStringPlayer display name as shipped by NGS.
team_abbrStringTeam abbreviation.
positionStringPlayer position (from NGS player_position).
receptionsFloat64Season reception count — the shrinkage weight.
avg_yacFloat64Average yards after catch per reception.
avg_expected_yacFloat64NGS tracking-model expected YAC per reception.
yac_oe_rawFloat64NGS avg_yac_above_expectation passed through unchanged — per-reception YAC minus the tracking-model expectation.
yac_oe_shrunkFloat64yac_oe_raw after per-season empirical-Bayes shrinkage toward the reception-weighted league mean (sampling variance identified from weekly rows).
reliabilityFloat64Shrinkage reliability tau2 / (tau2 + sigma2 / receptions) in [0, 1]; the fraction of the raw deviation retained.
yac_oe_rankInt64Dense descending rank of yac_oe_shrunk within season over qualified rows; null when receptions < min_receptions.

Example

from sportsdataverse.nfl import nfl_ngs_yac_oe
df = nfl_ngs_yac_oe([2023])
print(df.sort("yac_oe_rank").head())

# Pandas output

df_pd = nfl_ngs_yac_oe(2023, return_as_pandas=True)

scrape_ngs_season​

scrape_ngs_season(stat_type: 'str', season: 'int', *, include_season_totals: 'bool' = True, return_as_pandas: 'bool' = False)

Scrape a full season of NGS statboard data, shaped like the nflverse parquet.

Port of nflverse ngs-data's R save_ngs_type: loop the regular-season weeks (1..max_reg where max_reg = 18 for season >= 2021 else 17) plus the playoff weeks (max_reg+1 .. max_reg+5, fetched with season_type="POST"), stack them diagonally, and -- when include_season_totals -- prepend the season-aggregate rows (NGS week=0, a REG call with no week param) tagged week=0. Duplicate rows (NGS returned dupes for some 2022 weeks) are de-duplicated on (season, week, player_gsis_id).

Output columns match the published nflverse NGS parquet read by sportsdataverse.nfl.load_nfl_nextgen_stats (snake_case, team_abbr resolved). It will not be byte-identical -- nflverse post-processes (column pruning / ordering) -- but the core metric columns and the player/team/week keys align.

NGS statboard rows are player-week aggregates, NOT per-play rows.

Parameters

ParameterTypeDefaultDescription
stat_typestrone of "passing", "rushing", "receiving".
seasonintseason year (NGS coverage starts in 2016).
include_season_totalsboolTruealso fetch the season-aggregate (week=0) rows. Defaults to True (matches ngs-data, whose week loop starts at 0).
return_as_pandasboolFalsereturn a pandas frame instead of polars.

Returns

A polars (or pandas) DataFrame stacking every week (and, by default, the season totals) for the requested stat_type and season. An EMPTY frame carrying the documented key schema if nothing is returned.

col_nametypedescription
aggressivenessFloat64Percentage of pass attempts thrown into tight windows (defender within one yard of the receiver at completion or incompletion), from NFL Next Gen Stats. Passing only.
attemptsInt64Pass attempts (including incompletions) recorded for the passer during the slice. Passing only.
avg_air_distanceFloat64Average air distance in yards on all pass attempts, measuring how far the ball travels through the air regardless of direction. Passing only.
avg_air_yards_differentialFloat64Average difference between intended air yards and completed air yards, measuring accuracy relative to target depth. Passing only.
avg_air_yards_to_sticksFloat64Average air yards relative to the first-down marker on pass attempts (positive = beyond the sticks). Passing only.
avg_completed_air_yardsFloat64Average air yards on completed passes only, measuring depth of actual completions. Passing only.
avg_intended_air_yardsFloat64Average depth of target on all pass attempts, regardless of completion. Passing/receiving.
avg_time_to_throwFloat64Average time in seconds from snap to release for the passer, as tracked by NFL Next Gen Stats. Passing only.
completion_percentageFloat64Actual completion percentage for the passer during the slice. Passing only.
completion_percentage_above_expectationFloat64Completion percentage above the model-expected completion rate (CPOE/CPAE). Passing only.
completionsInt64Completed passes for the passer during the slice. Passing only.
expected_completion_percentageFloat64Model-expected completion percentage based on target depth, separation, and coverage, from NFL Next Gen Stats. Passing only.
games_playedInt64Number of games played by the player during the slice covered by the row.
interceptionsInt64Interceptions thrown by the passer during the slice. Passing only.
max_air_distanceFloat64Maximum air distance in yards recorded on any single pass attempt during the slice. Passing only.
max_completed_air_distanceFloat64Maximum air distance in yards recorded on any single completed pass during the slice. Passing only.
pass_touchdownsInt64Passing touchdowns thrown by the passer during the slice. Passing only.
pass_yardsInt64Total passing yards accumulated by the passer during the slice. Passing only.
passer_ratingFloat64NFL passer rating (0–158.3 scale) for the passer during the slice. Passing only.
player_nameStringDisplay name of the player as returned at the top-level statboard row.
seasonInt64NFL season year for the row.
season_typeStringSeason segment for the row ('REG' for regular-season weeks and the week-0 aggregate, 'POST' for playoff weeks).
weekInt64NFL Next Gen Stats week tag; 0 is the season aggregate, 1..max_reg are regular-season weeks, and higher values are continuous playoff weeks.
positionStringPlayer position as returned at the top-level statboard row (e.g., 'QB', 'WR', 'RB').
team_idStringNFL Next Gen Stats team identifier for the player's team on this row; the key joined to resolve team_abbr.
player_seasonInt64NFL season year recorded in the nested player record.
player_season_typeStringSeason segment recorded in the nested player record.
player_weekInt64Week recorded in the nested player record (the loop week tag overrides this on the top-level week column).
player_jersey_numberInt64Jersey number worn by the player.
player_last_nameStringLast name of the player.
player_football_nameStringFootball name used by the player, which may differ from the legal first name.
player_first_nameStringFirst name of the player.
player_positionStringPlayer position from the nested player record.
player_gsis_it_idInt64NFL GSIS internal tracking integer identifier for the player.
player_gsis_idStringNFL GSIS (Game Statistics and Information System) identifier, the primary nflverse player key.
player_esb_idStringElias Sports Bureau (ESB) identifier for the player.
player_display_nameStringFull display name of the player as used in NFL Next Gen Stats records.
player_short_nameStringShortened display name for the player (e.g., 'P.Mahomes').
player_uniform_numberStringUniform number worn by the player, stored as a string to preserve leading zeros if applicable.
player_statusStringCurrent roster status of the player (e.g., 'ACT' for active, 'IR' for injured reserve).
player_current_team_idStringNFL Next Gen Stats team identifier for the team the player is currently rostered on.
player_smart_idStringNFL Next Gen Stats smart (UUID-style) identifier for the player.
player_headshotStringURL template for the player's headshot image.
player_position_groupStringBroad position group for the player (e.g., 'QB', 'WR') in the NGS player record.
player_ngs_positionStringPlayer's position as classified by the NFL Next Gen Stats system.
player_ngs_position_groupStringBroader position group the player belongs to as classified by the NFL Next Gen Stats system.
team_abbrStringTeam abbreviation resolved from team_id via the NGS team directory (relocated franchise abbreviations dropped to keep the mapping one-to-one).

Example

from sportsdataverse.nfl import scrape_ngs_season
pas = scrape_ngs_season("passing", 2023)
pas.select(["season", "week", "player_display_name", "team_abbr"]).head()

# Regular-season weeks only (skip the week-0 totals)

wk = scrape_ngs_season("receiving", 2023, include_season_totals=False)

# Column-compatible with the published parquet

from sportsdataverse.nfl import load_nfl_nextgen_stats
published = load_nfl_nextgen_stats(seasons=[2023], stat_type="passing")
shared = set(pas.columns) & set(published.columns)

scrape_ngs_week​

scrape_ngs_week(stat_type: 'str', season: 'int', week: 'int', season_type: 'str' = 'REG', *, return_as_pandas: 'bool' = False)

Scrape one (season, week) NGS statboard slice, shaped like the nflverse parquet.

Port of nflverse ngs-data's R load_week_ngs: fetch a single statboard slice via nfl_ngs_statboard, resolve team_abbr from the team directory, snake-case every column, and tag the row with the loop week. week=0 is the season-aggregate row (a season_type="REG" call with no week query param); weeks 1..max_reg are regular-season, and the playoff weeks (max_reg+1 upward) are fetched with season_type="POST".

NGS statboard rows are player-week aggregates (avg_intended_air_yards, completion_percentage_above_expectation, avg_time_to_throw, ...), NOT per-play rows -- this is a season-stats source, not a per-play air-yards / completion-probability source.

Parameters

ParameterTypeDefaultDescription
stat_typestrone of "passing", "rushing", "receiving".
seasonintseason year (NGS coverage starts in 2016).
weekintNGS week. 0 -> season aggregate; 1..max_reg -> REG; higher -> POST. The supplied value is what tags the returned rows.
season_typestr'REG'"REG" or "POST"; the caller (or scrape_ngs_season) selects this per week. Defaults to "REG".
return_as_pandasboolFalsereturn a pandas frame instead of polars.

Returns

A polars (or pandas) DataFrame of player-week NGS rows with snake-cased columns + a resolved team_abbr. An EMPTY frame carrying the documented key schema (not an exception) when the API yields no stats.

col_nametypedescription
aggressivenessFloat64Percentage of pass attempts thrown into tight windows (defender within one yard of the receiver at completion or incompletion), from NFL Next Gen Stats. Passing only.
attemptsInt64Pass attempts (including incompletions) recorded for the passer during the week. Passing only.
avg_air_distanceFloat64Average air distance in yards on all pass attempts, measuring how far the ball travels through the air regardless of direction. Passing only.
avg_air_yards_differentialFloat64Average difference between intended air yards and completed air yards, measuring accuracy relative to target depth. Passing only.
avg_air_yards_to_sticksFloat64Average air yards relative to the first-down marker on pass attempts (positive = beyond the sticks). Passing only.
avg_completed_air_yardsFloat64Average air yards on completed passes only, measuring depth of actual completions. Passing only.
avg_intended_air_yardsFloat64Average depth of target on all pass attempts, regardless of completion. Passing/receiving.
avg_time_to_throwFloat64Average time in seconds from snap to release for the passer, as tracked by NFL Next Gen Stats. Passing only.
completion_percentageFloat64Actual completion percentage for the passer during the week. Passing only.
completion_percentage_above_expectationFloat64Completion percentage above the model-expected completion rate (CPOE/CPAE). Passing only.
completionsInt64Completed passes for the passer during the week. Passing only.
expected_completion_percentageFloat64Model-expected completion percentage based on target depth, separation, and coverage, from NFL Next Gen Stats. Passing only.
games_playedInt64Number of games played by the player during the slice covered by the row.
interceptionsInt64Interceptions thrown by the passer during the week. Passing only.
max_air_distanceFloat64Maximum air distance in yards recorded on any single pass attempt during the week. Passing only.
max_completed_air_distanceFloat64Maximum air distance in yards recorded on any single completed pass during the week. Passing only.
pass_touchdownsInt64Passing touchdowns thrown by the passer during the week. Passing only.
pass_yardsInt64Total passing yards accumulated by the passer during the week. Passing only.
passer_ratingFloat64NFL passer rating (0–158.3 scale) for the passer during the week. Passing only.
player_nameStringDisplay name of the player as returned at the top-level statboard row.
seasonInt64NFL season year for the row.
season_typeStringSeason segment for the row ('REG' or 'POST') as supplied by the caller.
weekInt64NFL Next Gen Stats week tag supplied by the caller; 0 is the season aggregate, 1..max_reg are regular-season weeks, and higher values are continuous playoff weeks.
positionStringPlayer position as returned at the top-level statboard row (e.g., 'QB', 'WR', 'RB').
team_idStringNFL Next Gen Stats team identifier for the player's team on this row; the key joined to resolve team_abbr.
player_seasonInt64NFL season year recorded in the nested player record.
player_season_typeStringSeason segment recorded in the nested player record.
player_weekInt64Week recorded in the nested player record (the loop week tag overrides this on the top-level week column).
player_jersey_numberInt64Jersey number worn by the player.
player_last_nameStringLast name of the player.
player_football_nameStringFootball name used by the player, which may differ from the legal first name.
player_first_nameStringFirst name of the player.
player_positionStringPlayer position from the nested player record.
player_gsis_it_idInt64NFL GSIS internal tracking integer identifier for the player.
player_gsis_idStringNFL GSIS (Game Statistics and Information System) identifier, the primary nflverse player key.
player_esb_idStringElias Sports Bureau (ESB) identifier for the player.
player_display_nameStringFull display name of the player as used in NFL Next Gen Stats records.
player_short_nameStringShortened display name for the player (e.g., 'P.Mahomes').
player_uniform_numberStringUniform number worn by the player, stored as a string to preserve leading zeros if applicable.
player_statusStringCurrent roster status of the player (e.g., 'ACT' for active, 'IR' for injured reserve).
player_current_team_idStringNFL Next Gen Stats team identifier for the team the player is currently rostered on.
player_smart_idStringNFL Next Gen Stats smart (UUID-style) identifier for the player.
player_headshotStringURL template for the player's headshot image.
player_position_groupStringBroad position group for the player (e.g., 'QB', 'WR') in the NGS player record.
player_ngs_positionStringPlayer's position as classified by the NFL Next Gen Stats system.
player_ngs_position_groupStringBroader position group the player belongs to as classified by the NFL Next Gen Stats system.
team_abbrStringTeam abbreviation resolved from team_id via the NGS team directory (relocated franchise abbreviations dropped to keep the mapping one-to-one).

Example

from sportsdataverse.nfl import scrape_ngs_week
wk1 = scrape_ngs_week("passing", 2023, week=1)
wk1.select(["season", "week", "player_display_name", "team_abbr"]).head()

# Season-aggregate row (week 0)

tot = scrape_ngs_week("rushing", 2023, week=0)