calculate_standings {nflfastR} | R Documentation |
Compute Division Standings and Conference Seeds from Play by Play
Description
This function calculates division standings as well as playoff seeds per conference based on either nflverse play-by-play data or nflverse schedule data.
Usage
calculate_standings(
nflverse_object,
tiebreaker_depth = 3,
playoff_seeds = NULL
)
Arguments
nflverse_object |
Data object of class |
tiebreaker_depth |
A single value equal to 1, 2, or 3. The default is 3. The value controls the depth of tiebreakers that shall be applied. The deepest currently implemented tiebreaker is strength of schedule. The following values are valid:
|
playoff_seeds |
Number of playoff teams per conference. If |
Value
A tibble with NFL regular season standings
Examples
try({# to avoid CRAN test problems
# load nflverse data both schedules and pbp
scheds <- fast_scraper_schedules(2014)
pbp <- load_pbp(c(2018, 2021))
# calculate standings based on pbp
calculate_standings(pbp)
# calculate standings based on schedules
calculate_standings(scheds)
})