Skip to contents

The backbone of the ffsimulator resampling process is coming up with a population of weekly outcomes for every inseason weekly rank. This function creates that dataframe by connecting historical FantasyPros.com rankings to nflfastR-based scoring data, as created by ffscrapr::ff_scoringhistory().

Usage

ffs_adp_outcomes_week(scoring_history, pos_filter = c("QB", "RB", "WR", "TE"))

Arguments

scoring_history

a scoring history table as created by ffscrapr::ff_scoringhistory()

pos_filter

a character vector: filter the positions returned to these specific positions, default: c("QB","RB","WR","TE)

Value

a dataframe with position, rank, probability of games played, and a corresponding nested list per row of all week score outcomes.

See also

fp_rankings_history_week for the included historical rankings

Examples

# \donttest{
# cached data
scoring_history <- .ffs_cache("mfl_scoring_history.rds")
ffs_adp_outcomes_week(scoring_history, pos_filter = c("QB","RB","WR","TE"))
#> # A tidytable: 471 × 5
#>    pos    rank week_outcomes player_name fantasypros_id
#>    <chr> <dbl> <list>        <list>      <list>        
#>  1 QB        1 <dbl [96]>    <chr [31]>  <chr [31]>    
#>  2 QB        2 <dbl [96]>    <chr [37]>  <chr [37]>    
#>  3 QB        3 <dbl [96]>    <chr [47]>  <chr [47]>    
#>  4 QB        4 <dbl [96]>    <chr [52]>  <chr [52]>    
#>  5 QB        5 <dbl [96]>    <chr [57]>  <chr [57]>    
#>  6 QB        6 <dbl [96]>    <chr [54]>  <chr [54]>    
#>  7 QB        7 <dbl [96]>    <chr [55]>  <chr [55]>    
#>  8 QB        8 <dbl [96]>    <chr [58]>  <chr [58]>    
#>  9 QB        9 <dbl [96]>    <chr [64]>  <chr [64]>    
#> 10 QB       10 <dbl [96]>    <chr [70]>  <chr [70]>    
#> # … with 461 more rows
#> # ℹ Use `print(n = ...)` to see more rows
# }