This function downloads precomputed expected points data from the ffopportunity automated releases.
Usage
ep_load(
season = nflreadr::most_recent_season(),
type = c("weekly", "pbp_pass", "pbp_rush"),
version = c("latest", "v1.0.0")
)
Arguments
- season
A numeric vector of four digit years associated with given NFL seasons - defaults to latest season.
- type
Data type - one of
"weekly"
,"pbp_pass"
, or"pbp_rush"
- version
EP model version: one of "latest" (default) or "v1.0.0" - these are currently identical.
Value
a dataframe identical to what would be returned by ffopportunity::ep_build()
for a given season.
See also
Other main:
ep_build()
Examples
# \donttest{
try({
ep_load() %>% head(10)
ep_load(2020:2021) %>% head(10)
ep_load(2021, type = "pbp_pass") %>% head(10)
ep_load(2006, type = "pbp_rush", version = "v1.0.0") %>% head(10)
})
#> → <ffopportunity predictions>
#> → Generated 2022-10-17 09:56:37 with ep model version "v1.0.0"
#> # A tibble: 10 × 47
#> game_id play_id desc rushe…¹ full_…² posteam two_p…³ two_p…⁴ rush_…⁵ first…⁶
#> <chr> <dbl> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 2006_0… 58 (14:… 00-000… Warric… ATL 0 0 1 0
#> 2 2006_0… 80 (14:… 00-000… Warric… ATL 0 0 1 0
#> 3 2006_0… 183 (12:… 00-000… Warric… ATL 0 0 1 1
#> 4 2006_0… 227 (11:… 00-000… Warric… ATL 0 0 1 0
#> 5 2006_0… 336 (10:… 00-002… DeShau… CAR 0 0 1 0
#> 6 2006_0… 406 (8:5… 00-002… DeShau… CAR 0 0 1 1
#> 7 2006_0… 625 (6:2… 00-000… Warric… ATL 0 0 1 1
#> 8 2006_0… 647 (5:4… 00-002… Mike V… ATL 0 0 1 1
#> 9 2006_0… 674 (5:1… 00-000… Warric… ATL 0 0 1 0
#> 10 2006_0… 696 (4:3… 00-000… Warric… ATL 0 0 1 1
#> # … with 37 more variables: fumble_lost <dbl>, season <dbl>, week <int>,
#> # rushing_yards <dbl>, rush_touchdown <fct>, first_down <fct>,
#> # posteam_type <chr>, run_location <chr>, run_gap <chr>, run_gap_dir <chr>,
#> # surface <chr>, wind <int>, temp <int>, roof <chr>, position <chr>,
#> # yardline_100 <dbl>, half_seconds_remaining <dbl>,
#> # game_seconds_remaining <dbl>, fixed_drive <dbl>, era <chr>, xpass <dbl>,
#> # qtr <fct>, down <fct>, goal_to_go <fct>, ydstogo <dbl>, shotgun <fct>, …
# }