Skip to contents

Fetches a copy of the latest week-level stats from nflfastr's data repository, via the nflreadr package.

Usage

nflfastr_weekly(seasons = TRUE, type = c("offense", "kicking"))

Arguments

seasons

The seasons to return, TRUE returns all data available.

type

One of "offense" or "kicking"

Value

Weekly stats for all passers, rushers and receivers in the nflverse play-by-play data from the 1999 season to the most recent season

Details

The goal of this data is to replicate the NFL's official weekly stats, which can diverge a bit from what fantasy data feeds display.

If you have any issues with the output of this data, please open an issue in the nflfastr repository.

Examples

# \donttest{
try( # try only shown here because sometimes CRAN checks are weird
  nflfastr_weekly()
)
#> ── nflverse player stats: offense ──────────────────────────────────────────────
#>  Data updated: 2023-02-12 09:35:10 UTC
#> # A tibble: 124,066 × 52
#>    player…¹ playe…² playe…³ posit…⁴ posit…⁵ heads…⁶ recen…⁷ season  week seaso…⁸
#>    <chr>    <chr>   <chr>   <chr>   <chr>   <chr>   <chr>    <int> <int> <chr>  
#>  1 00-0000… NA      Abdul-… RB      RB      NA      MIA       1999     1 REG    
#>  2 00-0000… NA      Abdul-… RB      RB      NA      MIA       1999     2 REG    
#>  3 00-0000… NA      Abdul-… RB      RB      NA      MIA       1999     4 REG    
#>  4 00-0000… NA      Abdul-… RB      RB      NA      CLE       1999     7 REG    
#>  5 00-0000… NA      Abdul-… RB      RB      NA      CLE       1999     8 REG    
#>  6 00-0000… NA      Abdul-… RB      RB      NA      CLE       1999     9 REG    
#>  7 00-0000… NA      Abdul-… RB      RB      NA      CLE       1999    10 REG    
#>  8 00-0000… NA      Abdul-… RB      RB      NA      CLE       1999    11 REG    
#>  9 00-0000… NA      Abdul-… RB      RB      NA      CLE       1999    12 REG    
#> 10 00-0000… NA      Abdul-… RB      RB      NA      CLE       1999    13 REG    
#> # … with 124,056 more rows, 42 more variables: completions <int>,
#> #   attempts <int>, passing_yards <dbl>, passing_tds <int>,
#> #   interceptions <dbl>, sacks <dbl>, sack_yards <dbl>, sack_fumbles <int>,
#> #   sack_fumbles_lost <int>, passing_air_yards <dbl>,
#> #   passing_yards_after_catch <dbl>, passing_first_downs <dbl>,
#> #   passing_epa <dbl>, passing_2pt_conversions <int>, pacr <dbl>, dakota <dbl>,
#> #   carries <int>, rushing_yards <dbl>, rushing_tds <int>, …
# }