Load Player Level Weekly Stats
Arguments
- ...
Arguments passed on to
nflreadr::load_player_stats
seasons
a numeric vector of seasons to return, defaults to most recent season. If set to
TRUE
, returns all available data.stat_type
one of
"offense"
,"defense"
, or"kicking"
file_type
One of
c("rds", "qs", "csv", "parquet")
. Can also be set globally withoptions(nflreadr.prefer)
See also
The function calculate_player_stats()
and the corresponding examples
on the nflfastR website
Examples
# \donttest{
try({# to avoid CRAN test problems
stats <- load_player_stats()
dplyr::glimpse(stats)
})
#> Warning: We have changed the behavior of `load_player_stats()` as of nflfastR 4.3.0.
#> Calling it without an argument will return the current season only instead of
#> all available seasons.
#> Please try `load_player_stats(seasons = TRUE)` to get all seasons.
#> This warning is displayed once every 8 hours.
#> Rows: 294
#> Columns: 53
#> $ player_id <chr> "00-0026498", "00-0027973", "00-0029604", …
#> $ player_name <chr> "M.Stafford", "A.Dalton", "K.Cousins", "A.…
#> $ player_display_name <chr> "Matthew Stafford", "Andy Dalton", "Kirk C…
#> $ position <chr> "QB", "QB", "QB", "WR", "TE", "WR", "TE", …
#> $ position_group <chr> "QB", "QB", "QB", "WR", "TE", "WR", "TE", …
#> $ headshot_url <chr> "https://static.www.nfl.com/image/upload/f…
#> $ recent_team <chr> "LA", "CAR", "ATL", "CAR", "WAS", "CHI", "…
#> $ season <int> 2024, 2024, 2024, 2024, 2024, 2024, 2024, …
#> $ week <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
#> $ season_type <chr> "REG", "REG", "REG", "REG", "REG", "REG", …
#> $ opponent_team <chr> "DET", "NO", "PIT", "NO", "TB", "TEN", "BA…
#> $ completions <int> 34, 0, 16, 0, 0, 0, 0, 0, 18, 0, 0, 19, 0,…
#> $ attempts <int> 49, 1, 26, 0, 0, 0, 0, 0, 25, 0, 0, 23, 0,…
#> $ passing_yards <dbl> 317, 0, 155, 0, 0, 0, 0, 0, 171, 0, 0, 200…
#> $ passing_tds <int> 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, …
#> $ interceptions <dbl> 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, …
#> $ sacks <dbl> 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, …
#> $ sack_yards <dbl> 13, 0, 18, 0, 0, 0, 0, 0, 13, 0, 0, 1, 0, …
#> $ sack_fumbles <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ sack_fumbles_lost <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ passing_air_yards <dbl> 290, 6, 140, 0, 0, 0, 0, 0, 167, 0, 0, 200…
#> $ passing_yards_after_catch <dbl> 171, 0, 73, 0, 0, 0, 0, 0, 67, 0, 0, 96, 0…
#> $ passing_first_downs <dbl> 15, 0, 8, 0, 0, 0, 0, 0, 11, 0, 0, 7, 0, 0…
#> $ passing_epa <dbl> 4.5364209, -0.6210238, -11.0848526, NA, NA…
#> $ passing_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ pacr <dbl> 1.093103, 0.000000, 1.107143, NA, NA, NA, …
#> $ dakota <dbl> 0.10613713, NA, 0.01510826, NA, NA, NA, NA…
#> $ carries <int> 0, 0, 1, 0, 0, 0, 0, 0, 4, 4, 1, 2, 0, 0, …
#> $ rushing_yards <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 30, 13, 5, 13, 0, …
#> $ rushing_tds <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, …
#> $ rushing_fumbles <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ rushing_fumbles_lost <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ rushing_first_downs <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, …
#> $ rushing_epa <dbl> NA, NA, -5.9803170, NA, NA, NA, NA, NA, 3.…
#> $ rushing_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receptions <int> 0, 0, 0, 3, 3, 4, 3, 1, 0, 0, 4, 0, 0, 5, …
#> $ targets <int> 0, 0, 0, 4, 4, 11, 4, 1, 0, 0, 7, 0, 1, 6,…
#> $ receiving_yards <dbl> 0, 0, 0, 49, 28, 29, 34, 8, 0, 0, 40, 0, 0…
#> $ receiving_tds <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, …
#> $ receiving_fumbles <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receiving_fumbles_lost <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receiving_air_yards <dbl> 0, 0, 0, 64, 28, 105, 27, 6, 0, 0, 79, 0, …
#> $ receiving_yards_after_catch <dbl> 0, 0, 0, 18, 7, 15, 10, 2, 0, 0, 5, 0, 0, …
#> $ receiving_first_downs <dbl> 0, 0, 0, 2, 1, 2, 2, 0, 0, 0, 2, 0, 0, 3, …
#> $ receiving_epa <dbl> NA, NA, NA, 4.6427171, 0.7529512, -2.90709…
#> $ receiving_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ racr <dbl> NA, NA, NA, 0.76562500, 1.00000000, 0.2761…
#> $ target_share <dbl> NA, NA, NA, 0.13793103, 0.16666667, 0.3793…
#> $ air_yards_share <dbl> NA, NA, NA, 0.181818182, 0.224000000, 0.49…
#> $ wopr <dbl> NA, NA, NA, 0.33416928, 0.40680000, 0.9124…
#> $ special_teams_tds <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ fantasy_points <dbl> 14.68, 0.00, 6.20, 4.90, 2.80, 2.90, 3.40,…
#> $ fantasy_points_ppr <dbl> 14.68, 0.00, 6.20, 7.90, 5.80, 6.90, 6.40,…
# }