Skip to main content

College football — additional Python functions — Models and calculators: get_fg–load_recruit

get_fg_wp​

get_fg_wp(pbp_df) -> 'pd.DataFrame'

Expected win probability of attempting a field goal (cfb4th get_fg_wp).

Parameters

ParameterTypeDefaultDescription
pbp_dfPlay-by-play frame (polars or pandas) of fourth-down situations.

Returns

A pandas copy of pbp_df plus fg_make_prob, make_fg_wp, miss_fg_wp and fg_wp (= make_prob*make_wp + (1-make_prob)*miss_wp, from the kicking team's perspective). All four are NaN when the FG model is not bundled (FG_MODEL_AVAILABLE is False) -- probabilities are never fabricated.

col_nametypedescription
seasonInt64Season (4-digit year).
game_idInt64ESPN game identifier.
game_play_numberInt64Sequential play number within the game (excludes timeouts/end markers).
pos_team_idInt64Team id of the offense (possession team) on the play.
pos_teamStringTeam name in possession at the start of the play (offense, kickoff-aware).
def_pos_team_idInt64Team id of the defense on the play.
def_pos_teamStringTeam name on defense at the start of the play.
pos_team_scoreInt64Score for the team in possession at the start of the play.
def_pos_team_scoreInt64Score for the defensive team at the start of the play.
halfInt64Half indicator (1 or 2).
periodInt64Period (quarter) number.
downInt64Down of the play (1-4).
distanceInt64Yards to gain for a first down (or to the goal line in goal-to-go situations).
EPAFloat64Expected Points Added on the play (cfbfastR EPA model output).
wpaFloat64Win Probability Added on the play (cfbfastR WP model output).
wp_beforeFloat64Win probability for the possession team before the play (0-1).
wp_afterFloat64Win probability for the possession team after the play (0-1).
def_wp_beforeFloat64Win probability for the defensive team before the play (0-1).
def_wp_afterFloat64Win probability for the defensive team after the play (0-1).
penalty_detailStringParsed penalty description extracted from play text.
yds_penaltyStringYardage assessed on the penalty.
penalty_1st_convBooleanTRUE when the penalty resulted in a first down conversion.
new_seriesBooleanBinary flag for the start of a new series of downs.
firstD_by_kickoffBooleanBinary flag for a new first down arising from a kickoff.
firstD_by_possBooleanBinary flag for a new first down via change of possession.
firstD_by_penaltyBooleanBinary flag for a new first down via penalty.
firstD_by_yardsBooleanBinary flag for a new first down via yards gained.
def_EPAFloat64EPA for the defensive team on the play (sign-flipped offense EPA).
rz_playBooleanBinary flag for a red-zone play (yards_to_goal <= 20).
scoring_oppBooleanBinary flag for a scoring opportunity (yards_to_goal <= 40).
middle_8BooleanTRUE for plays in the middle-8 window (final 4 min of 1H, first 4 min of 2H).
stuffed_runBooleanTrue on a rush (any play type the processor counts as a rush, not a kneel) that gained zero or fewer yards; its mean over scrimmage rushes (rush and scrimmage_play) is the stuff rate.
change_of_pos_teamBooleanBinary flag for change of possession-team on the play.
downs_turnoverBooleanBinary flag for a turnover on downs.
pos_score_diff_startInt64Score differential for the possession team at the start of the play.
pos_score_ptsInt64Points scored on the play attributed to the possession team.
home_wp_beforeFloat64Home team win probability before the play (0-1).
away_wp_beforeFloat64Away team win probability before the play (0-1).
home_wp_afterFloat64Home team win probability after the play (0-1).
away_wp_afterFloat64Away team win probability after the play (0-1).
end_of_halfBooleanBinary flag for the last play of a half.
orig_play_typeStringOriginal CFBD play type label before cfbfastR cleaning.
offense_score_playBooleanBinary flag for an offensive scoring play.
defense_score_playBooleanBinary flag for a defensive scoring play.
pos_score_diffInt64Score differential from the possession team's perspective.
change_of_possBooleanBinary flag for change of possession on the play (CFBD offense field).
rusher_player_nameStringName of the rusher on a rushing play.
yds_rushedFloat64Rushing yards gained on the play.
passer_player_nameStringName of the passer on a passing play.
receiver_player_nameStringName of the receiver on a passing play.
yds_receivingFloat64Receiving yards gained on the play.
yds_sackedFloat64Yards lost on the sack.
sack_playersStringCombined names of all sack participants.
sack_player_nameStringPrimary sack player name.
sack_player_name2StringSecondary sack player name (when split between two defenders).
pass_breakup_player_nameStringName of the defender credited with the pass breakup.
interception_player_nameStringName of the defender credited with the interception.
yds_int_returnFloat64Yards gained on an interception return.
fumble_player_nameStringName of the player who fumbled.
fumble_forced_player_nameStringName of the player who forced the fumble.
fumble_recovered_player_nameStringName of the player who recovered the fumble.
yds_fumble_returnFloat64Yards gained on a fumble return.
punter_player_nameStringName of the punter.
yds_puntedFloat64Yards the ball traveled on the punt.
yds_punt_returnFloat64Yards gained on the punt return.
yds_punt_gainedFloat64Net yards gained on the punt (punt distance minus return).
punt_block_player_nameStringName of the player credited with blocking the punt.
punt_block_return_player_nameStringName of the player returning a blocked punt.
fg_kicker_player_nameStringName of the field goal kicker.
yds_fgFloat64Distance of the field goal attempt in yards.
fg_block_player_nameStringName of the player credited with blocking the field goal.
fg_return_player_nameStringName of the player returning the blocked/missed field goal.
kickoff_player_nameStringName of the kickoff specialist.
yds_kickoffFloat64Yards the ball traveled on the kickoff.
yds_kickoff_returnFloat64Yards gained on the kickoff return.
rushBooleanBinary flag for a rushing play.
rush_tdBooleanBinary flag for a rushing touchdown.
passBooleanBinary flag for a passing play (includes sacks).
pass_tdBooleanBinary flag for a passing touchdown.
completionBooleanBinary flag for a completed pass.
pass_attemptBooleanBinary flag for a pass attempt.
targetBooleanBinary flag for a targeted receiver on the play.
sackBooleanBinary flag for a sack (duplicate of sack_vec for downstream use).
intBooleanBinary flag for an interception.
int_tdBooleanBinary flag for an interception returned for a touchdown.
turnover_vecBooleanBinary flag for any play classified as a turnover.
kickoff_playBooleanBinary flag for a kickoff play.
scoring_playBooleanTRUE if the play resulted in a score.
td_playBooleanBinary flag for a touchdown play.
touchdownBooleanBinary flag for a touchdown (duplicate of td_play for downstream use).
safetyBooleanBinary flag for a safety.
fumble_vecBooleanBinary flag for a play involving a fumble.
kickoff_tbBooleanBinary flag for a kickoff touchback.
kickoff_onsideBooleanBinary flag for an onside kickoff attempt.
kickoff_oobBooleanBinary flag for a kickoff out of bounds.
kickoff_fair_catchBooleanBinary flag for a kickoff fair catch.
kickoff_downedBooleanBinary flag for a kickoff downed in the field of play.
kickoff_safetyBooleanBinary flag for a kickoff safety.
puntBooleanBinary flag for a punt play.
punt_playBooleanBinary flag for any punt-related play (includes blocks/returns).
punt_tbBooleanBinary flag for a punt touchback.
punt_oobBooleanBinary flag for a punt out of bounds.
punt_fair_catchBooleanBinary flag for a punt fair catch.
punt_downedBooleanBinary flag for a punt downed in the field of play.
punt_safetyBooleanBinary flag for a punt safety.
punt_blockedBooleanBinary flag for a blocked punt.
penalty_safetyBooleanBinary flag for a safety scored on a penalty.
fg_madeBooleanTRUE when the field goal attempt was successful.
fg_make_probFloat64Predicted probability of making the field goal (cfbfastR FG model, 0-1).
penalty_flagBooleanTRUE when a penalty was flagged on the play.
penalty_declinedBooleanTRUE when the penalty was declined.
penalty_no_playBooleanTRUE when the penalty nullified the play (no play counted).
penalty_offsetBooleanTRUE when offsetting penalties were called.
penalty_textStringTRUE when penalty information is detectable in the play text.
lead_wp_before2Float64Value of wp_before 2 plays ahead, used for sequence-aware derivations.
lead_wp_beforeFloat64Value of wp_before on the next play, used for sequence-aware derivations.
lead_pos_team2Float64Value of pos_team 2 plays ahead, used for sequence-aware derivations.
idInt64247Sports referencing id for the recruit.
sequenceNumberInt64
textStringFull play description.
awayScoreInt64
homeScoreInt64
scoringPlayBooleanESPN flag marking the play as a scoring play.
priorityBooleanTRUE if ESPN flags the play as a priority highlight.
modifiedStringISO timestamp the play record was last modified.
wallclockStringReal-world ISO timestamp of the play.
teamParticipantsStringRaw ESPN team-level participants payload carried through from the plays feed, a list as the live feed sends it, stringified in the release files.
isPenaltyBooleanESPN's per-play flag that a penalty occurred on the play.
statYardageInt64Yardage ESPN credits to the play for statistical purposes.
isTurnoverBooleanESPN's per-play turnover flag as shipped in the plays feed (broader than the giveaway-based is_turnover derivation).
type.idStringESPN's numeric identifier for the play type.
type.textStringESPN's text label for the play type.
type.abbreviationStringESPN's abbreviation for the play type.
period.numberInt64Period (quarter) number in which the play occurred.
clock.displayValueStringGame clock at the play, as the displayed mm:ss string.
start.downInt64ESPN's down value for the play state at the start of the play.
start.distanceInt64ESPN's distance value for the play state at the start of the play.
start.yardLineInt64ESPN's yardLine value for the play state at the start of the play.
start.yardsToEndzoneInt64ESPN's yardsToEndzone value for the play state at the start of the play.
start.team.idInt64ESPN's team.id value for the play state at the start of the play.
end.downInt64ESPN's down value for the play state at the end of the play.
end.distanceInt64ESPN's distance value for the play state at the end of the play.
end.yardLineInt64ESPN's yardLine value for the play state at the end of the play.
end.yardsToEndzoneFloat64ESPN's yardsToEndzone value for the play state at the end of the play.
end.downDistanceTextStringESPN's downDistanceText value for the play state at the end of the play.
end.shortDownDistanceTextStringESPN's shortDownDistanceText value for the play state at the end of the play.
end.possessionTextStringESPN's possessionText value for the play state at the end of the play.
end.team.idInt64ESPN's team.id value for the play state at the end of the play.
start.downDistanceTextStringESPN's downDistanceText value for the play state at the start of the play.
start.shortDownDistanceTextStringESPN's shortDownDistanceText value for the play state at the start of the play.
start.possessionTextStringESPN's possessionText value for the play state at the start of the play.
scoringType.nameStringESPN's name for the scoring type (e.g. touchdown, field goal).
scoringType.displayNameStringESPN's display label for the scoring type.
scoringType.abbreviationStringESPN's abbreviation for the scoring type.
pointAfterAttempt.idFloat64ESPN identifier for the point-after attempt type on the scoring play.
pointAfterAttempt.textStringESPN description of the point-after attempt and its result.
pointAfterAttempt.abbreviationStringESPN abbreviation of the point-after attempt type; drives the extra-point / two-point result derivation.
pointAfterAttempt.valueFloat64Points ESPN credits for the point-after attempt (1.0 made extra point, 2.0 made two-point try).
drive.idStringESPN's id field for the drive containing this play.
drive.displayResultStringESPN's displayResult field for the drive containing this play.
drive.isScoreBooleanESPN's isScore field for the drive containing this play.
drive.team.shortDisplayNameStringESPN's team.shortDisplayName field for the drive containing this play.
drive.team.displayNameStringESPN's team.displayName field for the drive containing this play.
drive.team.nameStringESPN's team.name field for the drive containing this play.
drive.team.abbreviationStringESPN's team.abbreviation field for the drive containing this play.
drive.yardsInt64ESPN's yards field for the drive containing this play.
drive.offensivePlaysInt64ESPN's offensivePlays field for the drive containing this play.
drive.resultStringESPN's result field for the drive containing this play.
drive.descriptionStringESPN's description field for the drive containing this play.
drive.shortDisplayResultStringESPN's shortDisplayResult field for the drive containing this play.
drive.timeElapsed.displayValueStringESPN's timeElapsed.displayValue field for the drive containing this play.
drive.start.period.numberInt64ESPN's start.period.number field for the drive containing this play.
drive.start.period.typeStringESPN's start.period.type field for the drive containing this play.
drive.start.yardLineInt64ESPN's start.yardLine field for the drive containing this play.
drive.start.clock.displayValueStringESPN's start.clock.displayValue field for the drive containing this play.
drive.start.textStringESPN's start.text field for the drive containing this play.
drive.end.period.numberFloat64ESPN's end.period.number field for the drive containing this play.
drive.end.period.typeStringESPN's end.period.type field for the drive containing this play.
drive.end.yardLineFloat64ESPN's end.yardLine field for the drive containing this play.
drive.end.clock.displayValueStringESPN's end.clock.displayValue field for the drive containing this play.
seasonTypeInt64ESPN season type for the game (2 = regular season, 3 = postseason).
weekInt64Game week of the season.
status_type_completedBoolean
homeTeamIdInt64ESPN's home-team Id for the game, stamped on every play.
awayTeamIdInt64ESPN's away-team Id for the game, stamped on every play.
homeFinalScoreInt64Final score of the home team from the ESPN game header, repeated on every play of the game; the processing step checks the running score at the last play against it.
awayFinalScoreInt64Final score of the away team from the ESPN game header, repeated on every play of the game; the processing step checks the running score at the last play against it.
homeTeamNameStringESPN's home-team Name for the game, stamped on every play.
awayTeamNameStringESPN's away-team Name for the game, stamped on every play.
homeTeamMascotStringESPN's home-team Mascot for the game, stamped on every play.
awayTeamMascotStringESPN's away-team Mascot for the game, stamped on every play.
homeTeamAbbrevStringESPN's home-team Abbrev for the game, stamped on every play.
awayTeamAbbrevStringESPN's away-team Abbrev for the game, stamped on every play.
homeTeamNameAltStringESPN's home-team NameAlt for the game, stamped on every play.
awayTeamNameAltStringESPN's away-team NameAlt for the game, stamped on every play.
gameSpreadFloat64Point spread used as an input to the win-probability model.
homeFavoriteBooleanTrue when the home team was favoured by the spread.
gameSpreadAvailableBooleanTrue when a spread was available for the game.
overUnderFloat64Over/under total used as a model input.
homeTeamSpreadFloat64ESPN's home-team Spread for the game, stamped on every play.
clock.minutesInt64Minutes remaining on the game clock at the play.
clock.secondsInt64Seconds component of the game clock at the play.
lag_halfFloat64Value of half on the previous play, used for sequence-aware derivations.
lead_halfInt64Value of half on the next play, used for sequence-aware derivations.
start.TimeSecsRemInt64Seconds remaining in the half from ESPN's clock stamp for this play, which is the end-of-play time in 2005 and 2007+ (the snap time in 2004 and most of 2006); tops out at 1800.
start.adj_TimeSecsRemInt64ESPN's adj_TimeSecsRem value for the play state at the start of the play.
lead_textStringValue of text on the next play, used for sequence-aware derivations.
lead_start_teamStringValue of start_team on the next play, used for sequence-aware derivations.
lead_start_yardsToEndzoneFloat64Value of start_yardsToEndzone on the next play, used for sequence-aware derivations.
lead_start_downFloat64Value of start_down on the next play, used for sequence-aware derivations.
lead_start_distanceFloat64Value of start_distance on the next play, used for sequence-aware derivations.
lead_scoringPlayStringValue of scoringPlay on the next play, used for sequence-aware derivations.
text_dupeBooleanAlways False in the emitted frame -- the duplicate-row filter it gates runs before the column is returned, so it marks nothing and is retained only for schema stability.
end_state_missingBooleanFlag that ESPN's end-of-play state (end.team.id) was absent and the end state was imputed.
start.pos_team.idInt64ESPN's pos_team.id value for the play state at the start of the play.
start.def_pos_team.idInt64ESPN's def_pos_team.id value for the play state at the start of the play.
end.def_pos_team.idInt64ESPN's def_pos_team.id value for the play state at the end of the play.
end.pos_team.idInt64ESPN's pos_team.id value for the play state at the end of the play.
start.pos_team.nameStringESPN's pos_team.name value for the play state at the start of the play.
start.def_pos_team.nameStringESPN's def_pos_team.name value for the play state at the start of the play.
end.pos_team.nameStringESPN's pos_team.name value for the play state at the end of the play.
end.def_pos_team.nameStringESPN's def_pos_team.name value for the play state at the end of the play.
start.is_homeBooleanESPN's is_home value for the play state at the start of the play.
end.is_homeBooleanESPN's is_home value for the play state at the end of the play.
homeTimeoutCalledBooleanTrue when the home team called a timeout on the play.
awayTimeoutCalledBooleanTrue when the away team called a timeout on the play.
end.homeTeamTimeoutsInt64ESPN's homeTeamTimeouts value for the play state at the end of the play.
end.awayTeamTimeoutsInt64ESPN's awayTeamTimeouts value for the play state at the end of the play.
start.homeTeamTimeoutsInt64ESPN's homeTeamTimeouts value for the play state at the start of the play.
start.awayTeamTimeoutsInt64ESPN's awayTeamTimeouts value for the play state at the start of the play.
end.TimeSecsRemInt64Seconds remaining in the half carried as this play's end state; currently the preceding row's clock stamp.
end.adj_TimeSecsRemInt64ESPN's adj_TimeSecsRem value for the play state at the end of the play.
start.posTeamTimeoutsInt64ESPN's posTeamTimeouts value for the play state at the start of the play.
start.defPosTeamTimeoutsInt64ESPN's defPosTeamTimeouts value for the play state at the start of the play.
end.posTeamTimeoutsInt64ESPN's posTeamTimeouts value for the play state at the end of the play.
end.defPosTeamTimeoutsInt64ESPN's defPosTeamTimeouts value for the play state at the end of the play.
firstHalfKickoffTeamIdInt64ESPN id of the team that kicked the opening kickoff (it receives the second-half kickoff), one value per game.
start.yardInt64ESPN's yard value for the play state at the start of the play.
end.yardInt64ESPN's yard value for the play state at the end of the play.
lag_scoringPlayStringValue of scoringPlay on the previous play, used for sequence-aware derivations.
down_1BooleanTrue when it is 1st down at the start of the play.
down_2BooleanTrue when it is 2nd down at the start of the play.
down_3BooleanTrue when it is 3rd down at the start of the play.
down_4BooleanTrue when it is 4th down at the start of the play.
down_1_endBooleanTrue when it is 1st down at the end of the play.
down_2_endBooleanTrue when it is 2nd down at the end of the play.
down_3_endBooleanTrue when it is 3rd down at the end of the play.
down_4_endBooleanTrue when it is 4th down at the end of the play.
td_checkBooleanInternal flag used while reconciling whether the play produced a touchdown.
forced_fumbleBooleanTrue when the defense forced a fumble on the play.
is_homeBoolean
lag_HA_score_diffFloat64Value of HA_score_diff on the previous play, used for sequence-aware derivations.
HA_score_diffInt64Home score minus away score for the play.
net_HA_score_ptsFloat64Net points the play added to the home-minus-away score margin.
H_score_diffFloat64Home team's score minus the away team's, from the home perspective.
A_score_diffFloat64Away team's score minus the home team's, from the away perspective.
lag_homeScoreInt64Value of homeScore on the previous play, used for sequence-aware derivations.
lag_awayScoreInt64Value of awayScore on the previous play, used for sequence-aware derivations.
start.homeScoreInt64ESPN's homeScore value for the play state at the start of the play.
start.awayScoreInt64ESPN's awayScore value for the play state at the start of the play.
end.homeScoreInt64ESPN's homeScore value for the play state at the end of the play.
end.awayScoreInt64ESPN's awayScore value for the play state at the end of the play.
start.pos_team_scoreInt64ESPN's pos_team_score value for the play state at the start of the play.
start.def_pos_team_scoreInt64ESPN's def_pos_team_score value for the play state at the start of the play.
start.pos_score_diffInt64ESPN's pos_score_diff value for the play state at the start of the play.
end.pos_team_scoreInt64ESPN's pos_team_score value for the play state at the end of the play.
end.def_pos_team_scoreInt64ESPN's def_pos_team_score value for the play state at the end of the play.
end.pos_score_diffInt64ESPN's pos_score_diff value for the play state at the end of the play.
start.pos_team_receives_2H_kickoffBooleanESPN's pos_team_receives_2H_kickoff value for the play state at the start of the play.
end.pos_team_receives_2H_kickoffBooleanESPN's pos_team_receives_2H_kickoff value for the play state at the end of the play.
penalty_in_textBooleanTrue when the play description mentions a penalty.
penalty_countInt64Number of penalties flagged on the play (0-4 observed).
penalty_declined_countInt64Number of the flagged penalties that were declined.
penalty_all_declinedBooleanWhether every penalty flagged on the play was declined.
penalty_enforcementStringHow the penalty was resolved: one of no_play, declined, offsetting, negating_foul, play_stands, unknown.
penalty_negated_playStringWhether the penalty negated the play's result.
pass_breakupBooleanTrue when a defender broke up the pass.
pass_depthStringThrown-pass depth parsed from ESPN play text ("short" or "deep"); null when the text omits it (sacks, screens, pre-2025 text).
pass_directionStringPass direction parsed from ESPN play text ("left", "middle", or "right"); null when the text omits it.
rush_directionStringRush direction parsed from ESPN play text ("left", "middle", or "right"); null when the text omits it.
qb_hurryBooleanWhether ESPN's play text says the quarterback was hurried into the throw ("hurried by ..."). It records hurried incompletions, not every pressure: on 2026 FBS Weeks 1-12 it is on 8.6% of dropbacks (7.7-9.7% by conference), 21.8% of incompletions, 1.0% of completions and 2.8% of sacks, and 236 of 1,517 FBS defense-games have none. A count of it is a floor, not a pressure rate.
fg_attemptBooleanTrue when the play was a field-goal attempt.
pos_unitStringPossession-team unit label (offense or special teams).
def_pos_unitStringDefensive possession-team unit label (defense or special teams).
spBoolean
playBooleanBinary flag indicating the row is a counted play (excludes end markers/timeouts/penalties).
cleaned_textStringPlay description with overturned-call prefixes stripped; the text the name and team extractors run against.
kneel_downBooleanWhether the play is an offensive kneel, from explicit kneel text plus an end-of-half TEAM-rush heuristic.
scrimmage_playBooleanTrue when the play is a play from scrimmage rather than a special-teams or administrative row.
pos_score_diff_endInt64Score differential from the possessing team's perspective at the end of the play.
fumble_lostBoolean
fumble_recoveredBooleanTrue when a fumble on the play was recovered.
field_goal_resultString
extra_point_resultString
two_point_conv_resultStringString result of the two-point conversion attempt: success, failure, or safety (touchback in the defensive end zone).
defensive_two_point_attemptBoolean
defensive_two_point_convBoolean
yds_punted_sourceStringProvenance of yds_punted: "text" when the value was present before the special-teams derivation step (parsed from the play text, or set by a flag convention such as a blocked punt's 0), "derived" when that step filled it from field position, null when there is no value.
yds_kickoff_sourceStringProvenance of yds_kickoff: "text" when the value was present before the special-teams derivation step (parsed from the play text, or set by a flag convention such as a blocked punt's 0), "derived" when that step filled it from field position, null when there is no value.
yds_punt_return_sourceStringProvenance of yds_punt_return: "text" when the value was present before the special-teams derivation step (parsed from the play text, or set by a flag convention such as a blocked punt's 0), "derived" when that step filled it from field position, null when there is no value.
air_yardsToEndzoneFloat64Yards to the endzone at the catch spot, parsed from the 2025+ vendor catch-spot text; null before 2025 or when unresolvable.
air_yardsFloat64
yards_after_catchFloat64
kickoff_return_player_nameStringName of the player returning the kickoff, when the play was returned.
punt_return_player_nameStringName of the player returning the punt, when the punt was returned.
xp_attemptBooleanWhether an extra-point kick was attempted on the play.
xp_madeBooleanWhether the extra-point kick was successful.
xp_kicker_player_nameStringName of the kicker attempting the extra point.
kicking_teamFloat64Team id of the kicking team on kickoff, punt, and field-goal plays.
return_teamFloat64Team id of the returning side; set on interception, fumble, kickoff, punt, and blocked-kick returns.
fumble_or_muffBooleanWhether the play includes a fumble or a muffed kick or punt (widened beyond ESPN's fumble play types).
recovery_teamFloat64Team id parsed from the play text as recovering the fumble or muff.
recovery_team_2Float64Team id of the second recovery in a multi-recovery scramble, parsed from the play text.
penalty_spot_yardlineFloat64Yard line (0-50) at which the penalty was spotted.
penalty_spot_sideStringSide of the field the penalty was spotted on: 'home', 'away' or 'mid' (midfield).
penalty_spot_yardsToEndzoneFloat64Yards from the penalty spot to the end zone (0-100).
fumbling_teamFloat64Team id of the side that fumbled or muffed the ball, parsed from the play text.
int_turnoverBooleanWhether the play is an interception giveaway.
pos_fumble_lostBooleanWhether the possession team fumbled and lost the ball.
def_fumble_lostBooleanWhether the defending team (e.g. a returner after a takeaway) fumbled and lost the ball back.
is_pos_team_turnoverBooleanWhether the possession team committed a giveaway (interception or fumble lost).
is_def_pos_team_turnoverBooleanWhether the defending team gave the ball back via a lost fumble.
is_turnoverBooleanTrue when the play is a giveaway-based turnover (interception thrown or fumble lost); blocked kicks recovered by the defense are carried by the blocked-kick fields instead.
turnover_teamFloat64Team id charged with the giveaway on the play.
is_st_turnoverBooleanWhether the giveaway happened on a special-teams play (kick or punt snap, or a return).
is_blocked_punt_turnoverBooleanBlocked-punt possession loss (blocked-punt TD, or the defense recovered); kept out of is_turnover to match ESPN's giveaway-only box.
is_blocked_fg_turnoverBooleanBlocked-field-goal possession loss (blocked-FG TD, or the defense recovered); kept out of is_turnover to match ESPN's giveaway-only box.
sack_teamInt64Team id credited with the sack (the defense).
interception_teamInt64Team id credited with the interception (the defense).
pass_breakup_teamInt64Team id credited with the pass breakup (the defense).
forced_fumble_teamInt64Team id credited with forcing the fumble -- the side opposite the fumbling player (the covering team on returns).
fumble_recovery_teamFloat64Team id that recovered the fumble or muff, from parsed text with a giveaway / own-recovery fallback.
punt_return_teamFloat64Team id of the punt-returning side.
kick_return_teamFloat64Team id of the kick-returning side.
fg_teamFloat64Team id attempting the field goal (the kicking team).
punt_teamFloat64Team id punting the ball (the kicking team).
penalized_teamFloat64Team id the penalty was assessed against, from the home/away text resolver with a foul-direction fallback.
penalty_yards_signedInt64Penalty yardage parsed from the play text with era-aware bounds; the printed sign is retained but is not a reliable enforcement direction.
penalty_sideStringWhich side committed the penalty -- 'off' (offense) or 'def' (defense).
penalty_yards_netFloat64Net yardage assessed for the penalty, signed relative to the possession team (observed -25 to 25).
penalty_team_idFloat64Team id of the side that committed the penalty.
new_downInt64Down after the play, including any penalty enforcement.
new_distanceInt64Distance to go after the play, including any penalty enforcement.
under_2BooleanWhether the play began with two minutes or less remaining in the half.
goal_to_goBoolean
stopped_runBooleanTrue on a rush (any play type the processor counts as a rush, not a kneel) that gained two or fewer yards; a rushing touchdown of one or two yards counts.
opportunity_runBooleanTrue when a rush reached 4 yards -- the carries on which the blocking did its job. Matches cfbfastR's espn_cfb_15 definition. Assets published before the 2026-08 fix carry the inverted (4 yards or fewer) flag.
highlight_runBooleanTrue when the rush gained 8 or more yards.
adj_rush_yardageFloat64Rushing yards capped at 10, the input to the line-yards decomposition. Assets published before the 2026-10 line-yards fix cap at 8.
line_yardsFloat64Yards credited to the offensive line on a rush, on the standard adjusted-line-yards band: 1.2x the yardage on a loss, all of yards 0-4, half of each yard from 5 to 10, and nothing beyond 10 (a 7-yard ceiling). Line, second-level and open-field yards sum to the carry on every gain. Assets published before the 2026-10 line-yards fix carry the old band (all of yards 0-3, half of 4-8, a 5.5-yard ceiling).
second_level_yardsFloat64The ball carrier's half of yards 5-10 of a rush (the line takes the other half); 0 on carries of 4 yards or fewer. Assets published before the 2026-10 line-yards fix carry the old band here: half of yards 4-8 in college football, half of yards 5-8 in the NFL (where the old parts came up half a yard short of the carry).
open_field_yardsFloat64Rushing yards gained beyond 10, credited to the ball carrier rather than the line. Assets published before the 2026-10 line-yards fix count the yards beyond 8.
highlight_yardsFloat64Second-level plus open-field yards -- the yardage credited to the carrier.
opp_highlight_yardsFloat64Highlight yards earned on opportunity runs, isolating carrier production on carries where the blocking succeeded. Assets published before the 2026-08 fix are identically 0 here, because the inverted opportunity_run gate could never co-occur with non-zero highlight yards.
short_rush_successStringTrue when a short-yardage rush gained the yardage needed.
short_rush_attemptStringTrue when the play is a rush in a short-yardage situation.
early_downBooleanTrue when the play is a scrimmage play on first or second down.
late_downBooleanTrue when the play is a scrimmage play on third or fourth down.
power_rush_attemptStringTrue when the play is a short-yardage power rushing attempt.
power_rush_successStringTrue when a power rushing attempt gained the yardage needed.
early_down_passBooleanTrue when the play is a pass on an early down.
early_down_rushBooleanTrue when the play is a rush on an early down.
late_down_passBooleanTrue when the play is a pass on a late down.
late_down_rushBooleanTrue when the play is a rush on a late down.
standard_downBooleanTrue when the offense is on schedule for the series -- first down, second down needing fewer than 8, or third/fourth down needing fewer than 5.
passing_downBooleanTrue when the offense is behind schedule for the series -- second down needing 8 or more, or third/fourth down needing 5 or more.
TFLBooleanTrue when the play was a tackle for loss.
TFL_passBooleanTrue when the play was a tackle for loss on a pass play (a sack).
TFL_rushBooleanTrue when the play was a tackle for loss on a rush play.
havocBooleanTrue when the defense disrupted the play: a pass breakup, tackle for loss, interception or forced fumble.
first_down_yardsBooleanWhether the play gained enough yardage to earn a first down.
first_down_penaltyBoolean
first_down_earnedBooleanWhether the play earned a first down by means other than yardage (e.g. by penalty).
start.pos_team_spreadFloat64ESPN's pos_team_spread value for the play state at the start of the play.
start.elapsed_shareFloat64ESPN's elapsed_share value for the play state at the start of the play.
start.spread_timeFloat64ESPN's spread_time value for the play state at the start of the play.
end.pos_team_spreadFloat64ESPN's pos_team_spread value for the play state at the end of the play.
end.elapsed_shareFloat64ESPN's elapsed_share value for the play state at the end of the play.
end.spread_timeFloat64ESPN's spread_time value for the play state at the end of the play.
penalty_assessed_on_kickoffBooleanWhether a penalty was assessed on a kickoff; such plays take the kickoff/touchback win-probability handling.
start.yardsToEndzone.touchbackInt64ESPN's yardsToEndzone.touchback value for the play state at the start of the play.
EP_start_touchbackFloat64Expected points the offense would have had from a touchback on this play.
EP_startFloat64Expected points for the offense at the start of the play.
EP_endFloat64Expected points for the offense at the end of the play.
EP_penalty_cfFloat64Counterfactual expected points for the penalty branch -- the EP had the alternative penalty outcome been taken (null unless a penalty decision existed).
penalty_cf_yardsToEndzoneFloat64Yards to the end zone in the counterfactual penalty branch.
lag_EP_endFloat64Value of EP_end on the previous play, used for sequence-aware derivations.
EP_betweenFloat64Change in expected points across the play, before penalty adjustment.
EPA_scrimmageFloat64EPA credited to the play on plays from scrimmage.
EPA_rushFloat64EPA credited to the play on rush plays.
EPA_passFloat64EPA credited to the play on pass plays.
EPA_explosiveBooleanTrue when the play was explosive.
EPA_non_explosiveFloat64EPA credited to the play on non-explosive plays.
EPA_explosive_passBooleanTrue when the pass play was explosive.
EPA_explosive_rushBooleanTrue when the rush play was explosive.
first_down_createdBooleanTrue when the play produced a first down for the offense.
EPA_successBooleanTrue when the play was successful by EPA.
EPA_success_early_downBooleanTrue when the play on an early down was successful by EPA.
EPA_success_early_down_passBooleanTrue when the pass play on an early down was successful by EPA.
EPA_success_early_down_rushBooleanTrue when the rush play on an early down was successful by EPA.
EPA_success_late_downBooleanTrue when the play on a late down was successful by EPA.
EPA_success_late_down_passBooleanTrue when the pass play on a late down was successful by EPA.
EPA_success_late_down_rushBooleanTrue when the rush play on a late down was successful by EPA.
EPA_success_standard_downBooleanTrue when the play on a standard down was successful by EPA.
EPA_success_passing_downBooleanTrue when the play on a passing down was successful by EPA.
EPA_success_passBooleanTrue when the pass play was successful by EPA.
EPA_success_rushBooleanTrue when the rush play was successful by EPA.
EPA_success_EPAFloat64EPA on successful plays.
EPA_success_standard_down_EPAFloat64EPA on successful plays on a standard down.
EPA_success_passing_down_EPAFloat64EPA on successful plays on a passing down.
EPA_success_pass_EPAFloat64EPA on successful pass plays.
EPA_success_rush_EPAFloat64EPA on successful rush plays.
EPA_middle_8_successBooleanTrue when the play in the middle eight was successful by EPA.
EPA_middle_8_success_passBooleanTrue when the pass play in the middle eight was successful by EPA.
EPA_middle_8_success_rushBooleanTrue when the rush play in the middle eight was successful by EPA.
EPA_penaltyFloat64EPA credited to the play attributable to penalties.
EPA_penalty_directFloat64EPA attributable directly to the penalty on the play, separated from the EPA of the play itself (observed -11.7 to 8.05; null when no penalty applied).
EPA_spFloat64EPA credited to the play on special-teams plays.
EPA_fgFloat64EPA credited to the play on field-goal attempts.
EPA_puntFloat64EPA credited to the play on punt plays.
EPA_kickoffFloat64EPA credited to the play on kickoff plays.
start.ExpScoreDiff_touchbackFloat64ESPN's ExpScoreDiff_touchback value for the play state at the start of the play.
start.ExpScoreDiffFloat64ESPN's ExpScoreDiff value for the play state at the start of the play.
start.ExpScoreDiff_Time_Ratio_touchbackFloat64ESPN's ExpScoreDiff_Time_Ratio_touchback value for the play state at the start of the play.
start.ExpScoreDiff_Time_RatioFloat64ESPN's ExpScoreDiff_Time_Ratio value for the play state at the start of the play.
end.ExpScoreDiffFloat64ESPN's ExpScoreDiff value for the play state at the end of the play.
end.ExpScoreDiff_Time_RatioFloat64ESPN's ExpScoreDiff_Time_Ratio value for the play state at the end of the play.
wp_touchbackFloat64Win probability the offense would have had starting from a touchback.
wp_before_naiveFloat64Pre-snap possession-team win probability from the spread-free (naive) WP model.
wp_touchback_naiveFloat64Naive-model win probability for the kickoff-touchback substitute state, used as the pre-snap WP on kickoffs.
wp_after_naiveFloat64End-of-play possession-team win probability from the naive model, after the game-logic adjustment chain.
def_wp_before_naiveFloat64Pre-snap defense win probability under the naive model (1 - wp_before_naive).
home_wp_before_naiveFloat64Pre-snap naive win probability mapped to the home team.
away_wp_before_naiveFloat64Pre-snap naive win probability mapped to the away team.
lead_wp_before_naiveFloat64Next play's pre-snap naive win probability, used in the end-of-half and change-of-possession adjustments.
lead_wp_before2_naiveFloat64Pre-snap naive win probability two plays ahead, used where the immediately following row is a non-play.
def_wp_after_naiveFloat64End-of-play defense win probability under the naive model.
home_wp_after_naiveFloat64End-of-play naive win probability mapped to the home team.
away_wp_after_naiveFloat64End-of-play naive win probability mapped to the away team.
wpa_naiveFloat64Win probability added on the play under the spread-free (naive) model.
cpFloat64
cp_game_stateFloat64Completion probability from the 8-feature game-state booster, scored on every pass play regardless of which model produced cp. On one scale across seasons, so use it (not cp) for anything summed or averaged; null on non-pass plays.
cp_modelStringWhich completion-probability booster scored cp on the play: "air_yards" (the 11-feature model, used where ESPN's play text gives a catch/target spot -- essentially 2025 onward) or "game_state" (the 8-feature model used everywhere else). The two are not on one scale, so group any cpoe aggregate by this column; null on non-pass plays.
cpoeFloat64
eraInt64
xpassFloat64
pass_oeFloat64
drive_startFloat64Yard line at which the drive began.
drive_stoppedBooleanTrue when the play ended the drive.
drive_play_indexInt64Sequence number of the play within its drive.
drive_offense_playsInt64Offensive plays run on the drive.
prog_drive_EPAFloat64Cumulative EPA accrued by the drive up to and including this play.
prog_drive_WPAFloat64Cumulative win-probability added by the drive up to and including this play.
drive_offense_yardsInt64Offensive yards gained on the drive.
drive_total_yardsInt64Total yards gained on the drive.
qbr_epaFloat64EPA variant used as an input to the QBR calculation.
weightFloat64Listed weight (lbs).
non_fumble_sackBooleanTrue when the play was a sack that did not produce a fumble.
sack_epaFloat64EPA credited to the play when it is a sack.
pass_epaFloat64EPA credited to the play when it is a pass.
rush_epaFloat64EPA credited to the play when it is a rush.
pen_epaFloat64EPA attributable to a penalty on the play.
sack_weightFloat64Weighting applied to the sack component of the play.
pass_weightFloat64Weighting applied to the pass component of the play.
rush_weightFloat64Weighting applied to the rush component of the play.
pen_weightFloat64Weighting applied to the penalty component of the play.
action_playBooleanTrue when the play advanced the game state -- excludes timeouts, end-of-period markers and other non-action rows.
athlete_nameStringPlayer full name.
rusher_player_idFloat64
passer_player_idFloat64
receiver_player_idFloat64
fumble_player_idFloat64CFBD athlete_id of the player who fumbled.
sack_player_idFloat64Comma-separated CFBD athlete_id(s) of the sacking defender(s).
sack_player_id2Float64ESPN athlete id of the second sacker on a split sack (regex fallback for an ESPN sidecar blind spot).
interception_player_idFloat64CFBD athlete_id of the defender credited with an interception.
pass_breakup_player_idFloat64CFBD athlete_id of the defender credited with the pass breakup (PBU).
fumble_forced_player_idFloat64CFBD athlete_id of the defender credited with forcing the fumble.
fumble_recovered_player_idFloat64CFBD athlete_id of the player recovering the fumble.
fg_kicker_player_idFloat64ESPN athlete id of the field-goal kicker.
punter_player_idFloat64
kickoff_player_idFloat64ESPN athlete id of the player kicking off. An onside kicker ("#91 P.Woodring onside kickoff"), whom the participants feed omits, is matched by name first, then as the kicking team's athlete with that jersey and surname.
kickoff_return_player_idFloat64ESPN athlete id of the kickoff returner. A fair catcher, whom the participants feed omits, is matched by name first, then as the receiving team's athlete with the text's jersey and surname.
punt_return_player_idFloat64ESPN athlete id of the punt returner. A fair catcher, whom the participants feed omits, is matched by name first, then as the receiving team's athlete with the text's jersey and surname.
fg_block_player_idFloat64ESPN athlete id of the player who blocked the field goal.
punt_block_player_idStringESPN athlete id of the player who blocked the punt.
fg_return_player_idStringESPN athlete id of the player who returned the blocked or missed field goal.
punt_block_return_player_idStringESPN athlete id of the player who returned the blocked punt.
go_wpFloat64Win probability from going for it on fourth down: conversion-probability-weighted mean of the success and failure states (cfb4th port).
first_down_probFloat64Modeled probability of converting the fourth down when going for it.
wp_succeedFloat64Mean win probability across yardage outcomes given the fourth-down attempt converts.
wp_failFloat64Mean win probability given the fourth-down attempt fails.
make_fg_wpFloat64Win probability given the field-goal attempt is made.
miss_fg_wpFloat64Win probability given the field-goal attempt misses.
fg_wpFloat64Make-probability-weighted win probability of attempting the field goal.
punt_wpFloat64Win probability of punting, from the bundled punt-outcome distribution.
go_boostFloat64cfb4th's headline number: 100 * (go_wp - max(fg_wp, punt_wp)), in percentage points.
go_wp_diffFloat64go_wp minus the recommended option's WP (0 when going for it is the recommendation, otherwise <= 0).
fg_wp_diffFloat64fg_wp minus the recommended option's WP (0 when the field goal is the recommendation, otherwise <= 0).
punt_wp_diffFloat64punt_wp minus the recommended option's WP (0 when punting is the recommendation, otherwise <= 0).
fourth_down_recommendationStringMax-WP fourth-down choice among "go", "punt", and "field_goal".
two_pt_wpFloat64Win probability of going for two: conversion-probability-weighted mean of the 2-point and 0-point outcomes (cfb4th port).
xp_wpFloat64Win probability of kicking the extra point, weighting the make by the empirical CFB extra-point make rate.
prob_2ptFloat64Two-point conversion probability from the bundled CFB two-point model.
two_pt_recommendationStringPoint-after recommendation: "go_for_2" when two_pt_wp exceeds xp_wp, otherwise "kick_xp".
two_pt_wp_diffFloat64two_pt_wp minus xp_wp; positive favors going for two.

Raises

ExceptionDescription
KeyErrorIf pbp_df is missing a required state column from _PBP_COLS. The frame is validated up front rather than substituting NaN, which used to surface far downstream as AttributeError: 'float' object has no attribute 'to_numpy'.
ValueErrorIf season is absent or all-null. The era-aware models would otherwise score against an all-zero one-hot -- a rule era that never existed -- and return a plausible number.

Example

from sportsdataverse.cfb.cfb_fourth_down import get_fg_wp

import polars as pl

# The `start.*` state contract -- a 4th & 10 from midfield, tied,
# early in the 2nd quarter. Every column here is required; a missing
# one raises KeyError naming it.
fourth_down_rows = pl.DataFrame(
[
{
"start.down": 4,
"start.distance": 10,
"start.yardsToEndzone": 50,
"start.pos_team_spread": 3.0,
"pos_score_diff_start": 0,
"start.TimeSecsRem": 900,
"start.adj_TimeSecsRem": 1800,
"start.pos_team_receives_2H_kickoff": 1,
"start.posTeamTimeouts": 3,
"start.defPosTeamTimeouts": 3,
"start.is_home": 1,
"period": 2,
"season": 2023,
"overUnder": 55.5,
"homeTeamSpread": -3.0,
}
]
)

out = get_fg_wp(fourth_down_rows)
print(out[["fg_make_prob", "fg_wp"]].head())

get_go_wp​

get_go_wp(pbp_df) -> 'pd.DataFrame'

Expected win probability of going for it on 4th down (cfb4th get_go_wp).

Parameters

ParameterTypeDefaultDescription
pbp_dfPlay-by-play frame (polars or pandas) of fourth-down situations carrying the start.* state columns in _PBP_COLS.

Returns

A pandas copy of pbp_df plus go_wp (prob-weighted WP of going for it), first_down_prob (P(conversion)), wp_succeed (mean WP over conversion outcomes) and wp_fail (mean WP over failure outcomes). go_wp is always in [0, 1]; the conditional columns are in [0, 1] but can be NaN for degenerate goal-line plays where one outcome bucket is empty (matches the R reference pivot_wider NA behavior).

No returns table is published for this function: no capture: on the smallest real input (one released season of play-by-play) it runs longer than the capture allows.

Raises

ExceptionDescription
KeyErrorIf pbp_df is missing a required state column from _PBP_COLS. The frame is validated up front rather than substituting NaN, which used to surface far downstream as AttributeError: 'float' object has no attribute 'to_numpy'.
ValueErrorIf season is absent or all-null. The era-aware models would otherwise score against an all-zero one-hot -- a rule era that never existed -- and return a plausible number.

Example

from sportsdataverse.cfb.cfb_fourth_down import get_go_wp

import polars as pl

# The `start.*` state contract -- a 4th & 10 from midfield, tied,
# early in the 2nd quarter. Every column here is required; a missing
# one raises KeyError naming it.
fourth_down_rows = pl.DataFrame(
[
{
"start.down": 4,
"start.distance": 10,
"start.yardsToEndzone": 50,
"start.pos_team_spread": 3.0,
"pos_score_diff_start": 0,
"start.TimeSecsRem": 900,
"start.adj_TimeSecsRem": 1800,
"start.pos_team_receives_2H_kickoff": 1,
"start.posTeamTimeouts": 3,
"start.defPosTeamTimeouts": 3,
"start.is_home": 1,
"period": 2,
"season": 2023,
"overUnder": 55.5,
"homeTeamSpread": -3.0,
}
]
)

out = get_go_wp(fourth_down_rows)
print(out[["go_wp", "first_down_prob"]].head())

get_punt_wp​

get_punt_wp(pbp_df) -> 'pd.DataFrame'

Expected win probability of punting on 4th down (cfb4th get_punt_wp).

Parameters

ParameterTypeDefaultDescription
pbp_dfPlay-by-play frame (polars or pandas) of fourth-down situations.

Returns

A pandas copy of pbp_df plus punt_wp (prob-weighted WP of punting, from the punting team's perspective). punt_wp is NaN where the punt end-yardline distribution has no support for the play's yards_to_goal (e.g. inside the 31, where punting is dominated and the cfb4th table is empty -- matching the R reference's left-join NA behavior).

No returns table is published for this function: no capture: on the smallest real input (one released season of play-by-play) it runs longer than the capture allows.

Raises

ExceptionDescription
KeyErrorIf pbp_df is missing a required state column from _PBP_COLS. The frame is validated up front rather than substituting NaN, which used to surface far downstream as AttributeError: 'float' object has no attribute 'to_numpy'.

Example

from sportsdataverse.cfb.cfb_fourth_down import get_punt_wp

import polars as pl

# The `start.*` state contract -- a 4th & 10 from midfield, tied,
# early in the 2nd quarter. Every column here is required; a missing
# one raises KeyError naming it.
fourth_down_rows = pl.DataFrame(
[
{
"start.down": 4,
"start.distance": 10,
"start.yardsToEndzone": 50,
"start.pos_team_spread": 3.0,
"pos_score_diff_start": 0,
"start.TimeSecsRem": 900,
"start.adj_TimeSecsRem": 1800,
"start.pos_team_receives_2H_kickoff": 1,
"start.posTeamTimeouts": 3,
"start.defPosTeamTimeouts": 3,
"start.is_home": 1,
"period": 2,
"season": 2023,
"overUnder": 55.5,
"homeTeamSpread": -3.0,
}
]
)

out = get_punt_wp(fourth_down_rows)
print(out[["punt_wp"]].head())

load_draft_outcomes​

load_draft_outcomes(years: 'int | list[int]', *, return_as_pandas: 'bool' = False) -> 'pl.DataFrame | pd.DataFrame'

NFL draft picks with the college of each pick, for the requested draft years.

Parameters

ParameterTypeDefaultDescription
yearsint | list[int]A draft year or list of draft years.
return_as_pandasboolFalseIf True, return a pandas DataFrame; otherwise polars.

Returns

One row per pick: draft_year (Int64), college (Utf8 PFR-style college name), player_id (Utf8 ESPN college athlete id; null for older drafts), player_name (Utf8), round / pick (Int64), position (Utf8). Zero-row (typed) when the source is unavailable.

col_nametypedescription
draft_yearInt64NFL draft year of the pick.
collegeStringCollege of the pick (PFR-style name, e.g. "Ohio St.").
player_idStringESPN college athlete id as a string (null for older drafts).
player_nameStringPlayer name as listed on the pick record.
roundInt64Round of the NFL draft the player was selected in (1-7 in the modern format).
pickInt64Overall pick number.
positionStringPosition drafted at (PFR abbreviation).

Example

from sportsdataverse.cfb import load_draft_outcomes
picks = load_draft_outcomes([2023, 2024])
picks.group_by("college").len().sort("len", descending=True).head()

load_fp_curve​

load_fp_curve() -> 'pl.DataFrame'

Load the bundled EP-by-yardline curve (no network, no first-use download).

Returns

yardline_own: Int64 (1..99), ep: Float64.

col_nametypedescription
yardline_ownInt64Starting yard line from the offense's own goal (1-99).
epFloat64Bundled expected points for a drive starting at this yard line (2018-2021 fit).

Example

from sportsdataverse.cfb.cfb_field_position import load_fp_curve
curve = load_fp_curve()

load_recruit_classes​

load_recruit_classes(seasons: 'int | list[int]', *, division: 'str' = 'fbs', return_as_pandas: 'bool' = False) -> 'pl.DataFrame | pd.DataFrame'

Load recruiting classes as per-recruit rows from the 247 RDB feed.

Parameters

ParameterTypeDefaultDescription
seasonsint | list[int]A single recruiting-class year or a list of them.
divisionstr'fbs'Division slug (reserved for constant lookups downstream; the feed itself is queried for all of college football).
return_as_pandasboolFalseIf True, return a pandas DataFrame; otherwise polars.

Returns

One row per committed recruit: season (Int64), team_id (Utf8 — the 247 committed-team key), team (Utf8 full name — the downstream name-join key, since the 247 recruit-team key differs from the 247 talent-composite key), recruit_id (Utf8), stars (Int64), grade (Float64 247 composite rating), position (Utf8). Zero-row (typed) when no data is available.

col_nametypedescription
seasonInt64Recruiting-class year the recruit signed in.
team_idString247Sports signed-institution team key as a string (falls back to the committed institution when unsigned).
teamStringSigned-institution full name (falls back to committed) - the downstream name-join key.
recruit_idString247Sports recruit key as a string (integer-origin).
starsInt64247 composite star rating (1-5; null for unrated recruits).
gradeFloat64247 composite rating on the 0-100 scale.
positionStringPrimary position abbreviation from the 247 recruit record.

Example

from sportsdataverse.cfb.cfb_roster_talent import load_recruit_classes
rec = load_recruit_classes([2022, 2023])
rec.group_by("team").len().sort("len", descending=True).head()