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: 1,571
#> Columns: 53
#> $ player_id <chr> "00-0023459", "00-0024243", "00-0026498", …
#> $ player_name <chr> "A.Rodgers", "M.Lewis", "M.Stafford", "M.S…
#> $ player_display_name <chr> "Aaron Rodgers", "Marcedes Lewis", "Matthe…
#> $ position <chr> "QB", "TE", "QB", "QB", "QB", "QB", "QB", …
#> $ position_group <chr> "QB", "TE", "QB", "QB", "QB", "QB", "QB", …
#> $ headshot_url <chr> "https://static.www.nfl.com/image/private/…
#> $ recent_team <chr> "NYJ", "CHI", "LA", "LA", "LA", "LA", "LA"…
#> $ season <int> 2023, 2023, 2023, 2023, 2023, 2023, 2023, …
#> $ week <int> 1, 4, 1, 2, 3, 4, 5, 3, 5, 3, 3, 5, 1, 2, …
#> $ season_type <chr> "REG", "REG", "REG", "REG", "REG", "REG", …
#> $ completions <int> 0, 0, 24, 34, 18, 27, 21, 0, 0, 3, 34, 0, …
#> $ attempts <int> 1, 0, 38, 55, 33, 40, 37, 0, 0, 5, 58, 0, …
#> $ passing_yards <dbl> 0, 0, 334, 307, 269, 319, 222, 0, 0, 31, 3…
#> $ passing_tds <int> 0, 0, 0, 1, 1, 1, 2, 0, 0, 0, 2, 0, 0, 0, …
#> $ interceptions <dbl> 0, 0, 0, 2, 2, 1, 0, 0, 0, 2, 0, 0, 0, 0, …
#> $ sacks <dbl> 1, 0, 0, 1, 6, 2, 4, 0, 0, 0, 3, 0, 0, 0, …
#> $ sack_yards <dbl> 10, 0, 0, 10, 48, 16, 27, 0, 0, 0, 27, 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> 17, 0, 409, 363, 317, 297, 366, 0, 0, 31, …
#> $ passing_yards_after_catch <dbl> 0, 0, 106, 144, 99, 114, 90, 0, 0, 9, 128,…
#> $ passing_first_downs <dbl> 0, 0, 17, 17, 12, 16, 13, 0, 0, 2, 17, 0, …
#> $ passing_epa <dbl> -2.0319599, NA, 20.6799815, -5.0891927, -8…
#> $ passing_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ pacr <dbl> 0.0000000, NA, 0.8166259, 0.8457300, 0.848…
#> $ dakota <dbl> NA, NA, 0.21719006, -0.02970462, -0.010766…
#> $ carries <int> 0, 0, 3, 4, 1, 2, 0, 0, 0, 2, 2, 1, 0, 0, …
#> $ rushing_yards <dbl> 0, 0, 11, 17, 7, 14, 0, 0, 0, -1, 11, 1, 0…
#> $ rushing_tds <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, …
#> $ rushing_epa <dbl> NA, NA, 0.8680859, -0.4383297, 2.5295763, …
#> $ rushing_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receptions <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, …
#> $ targets <int> 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, …
#> $ receiving_yards <dbl> 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, …
#> $ receiving_tds <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 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, -3, 0, 0, 0, 0, 0, 8, 6, 0, 0, 0, 10, 1…
#> $ receiving_yards_after_catch <dbl> 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
#> $ receiving_first_downs <dbl> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, …
#> $ receiving_epa <dbl> NA, 0.4834648, NA, NA, NA, NA, NA, 2.70802…
#> $ receiving_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ racr <dbl> NA, 0.0000000, NA, NA, NA, NA, NA, 1.00000…
#> $ target_share <dbl> NA, 0.03125000, NA, NA, NA, NA, NA, 0.0294…
#> $ air_yards_share <dbl> NA, -0.01239669, NA, NA, NA, NA, NA, 0.029…
#> $ wopr <dbl> NA, 0.03819731, NA, NA, NA, NA, NA, 0.0644…
#> $ special_teams_tds <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ fantasy_points <dbl> 0.00, 0.80, 14.46, 13.98, 11.46, 16.16, 16…
#> $ fantasy_points_ppr <dbl> 0.00, 1.80, 14.46, 13.98, 11.46, 16.16, 16…
#> $ opponent_team <chr> "BUF", "DEN", "SEA", "SF", "CIN", "IND", "…
# }