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: 2022-06-07 16:34:10 UTC
#> # A tibble: 118,455 × 48
#>    player_id  player_name recent_team season  week season_type completions
#>    <chr>      <chr>       <chr>        <int> <int> <chr>             <int>
#>  1 00-0000003 A.al-Jabbar MIA           1999     1 REG                   0
#>  2 00-0000003 A.al-Jabbar MIA           1999     2 REG                   0
#>  3 00-0000003 A.al-Jabbar MIA           1999     4 REG                   0
#>  4 00-0000003 A.al-Jabbar CLE           1999     7 REG                   0
#>  5 00-0000003 A.al-Jabbar CLE           1999     8 REG                   0
#>  6 00-0000003 A.al-Jabbar CLE           1999     9 REG                   0
#>  7 00-0000003 A.al-Jabbar CLE           1999    10 REG                   0
#>  8 00-0000003 A.al-Jabbar CLE           1999    11 REG                   0
#>  9 00-0000003 A.al-Jabbar CLE           1999    12 REG                   0
#> 10 00-0000003 A.al-Jabbar CLE           1999    13 REG                   0
#> # … with 118,445 more rows, and 41 more variables: 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>, dakota <dbl>, carries <int>,
#> #   rushing_yards <dbl>, rushing_tds <int>, rushing_fumbles <dbl>, …
# }