View source: R/calculate_standings.R
calculate_standings | R Documentation |
This function calculates division standings as well as playoff seeds per conference based on either nflverse play-by-play data or nflverse schedule data.
calculate_standings(
nflverse_object,
tiebreaker_depth = 3,
playoff_seeds = NULL
)
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 |
A tibble with NFL regular season standings
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)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.