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: 5,653
#> Columns: 53
#> $ player_id <chr> "00-0023459", "00-0024243", "00-0024243", …
#> $ player_name <chr> "A.Rodgers", "M.Lewis", "M.Lewis", "M.Lewi…
#> $ player_display_name <chr> "Aaron Rodgers", "Marcedes Lewis", "Marced…
#> $ position <chr> "QB", "TE", "TE", "TE", "TE", "TE", "QB", …
#> $ position_group <chr> "QB", "TE", "TE", "TE", "TE", "TE", "QB", …
#> $ headshot_url <chr> "https://static.www.nfl.com/image/private/…
#> $ recent_team <chr> "NYJ", "CHI", "CHI", "CHI", "CHI", "CHI", …
#> $ season <int> 2023, 2023, 2023, 2023, 2023, 2023, 2023, …
#> $ week <int> 1, 4, 7, 11, 14, 16, 13, 14, 15, 16, 17, 1…
#> $ season_type <chr> "REG", "REG", "REG", "REG", "REG", "REG", …
#> $ opponent_team <chr> "BUF", "DEN", "LV", "DET", "DET", "ARI", "…
#> $ completions <int> 0, 0, 0, 0, 0, 0, 23, 26, 28, 27, 19, 34, …
#> $ attempts <int> 1, 0, 0, 0, 0, 0, 44, 45, 44, 42, 29, 46, …
#> $ passing_yards <dbl> 0, 0, 0, 0, 0, 0, 254, 311, 374, 368, 309,…
#> $ passing_tds <int> 0, 0, 0, 0, 0, 0, 2, 3, 2, 3, 3, 1, 0, 1, …
#> $ interceptions <dbl> 0, 0, 0, 0, 0, 0, 1, 1, 3, 2, 1, 2, 0, 2, …
#> $ sacks <dbl> 1, 0, 0, 0, 0, 0, 2, 1, 4, 0, 1, 4, 0, 1, …
#> $ sack_yards <dbl> 10, 0, 0, 0, 0, 0, 14, 4, 31, 0, 8, 39, 0,…
#> $ sack_fumbles <int> 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, …
#> $ sack_fumbles_lost <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, …
#> $ passing_air_yards <dbl> 17, 0, 0, 0, 0, 0, 543, 334, 382, 472, 179…
#> $ passing_yards_after_catch <dbl> 0, 0, 0, 0, 0, 0, 70, 158, 158, 108, 184, …
#> $ passing_first_downs <dbl> 0, 0, 0, 0, 0, 0, 10, 11, 12, 18, 9, 14, 1…
#> $ passing_epa <dbl> -2.031960, NA, NA, NA, NA, NA, -7.791564, …
#> $ passing_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, …
#> $ pacr <dbl> 0.0000000, NA, NA, NA, NA, NA, 0.4677716, …
#> $ dakota <dbl> NA, NA, NA, NA, NA, NA, -0.024772334, 0.00…
#> $ carries <int> 0, 0, 0, 0, 0, 0, 0, 4, 1, 2, 2, 3, 3, 4, …
#> $ rushing_yards <dbl> 0, 0, 0, 0, 0, 0, 0, -1, -1, 1, 3, 13, 11,…
#> $ 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, 1, 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, 1, 0, 1, 1, 2, 1, 1, …
#> $ rushing_epa <dbl> NA, NA, NA, NA, NA, NA, NA, -0.2038061, -0…
#> $ rushing_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receptions <int> 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ targets <int> 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receiving_yards <dbl> 0, 8, 16, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
#> $ receiving_tds <int> 0, 0, 0, 0, 0, 1, 0, 0, 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, 5, 9, -3, 1, 0, 0, 0, 0, 0, 0, 0, 0…
#> $ receiving_yards_after_catch <dbl> 0, 11, 11, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0…
#> $ receiving_first_downs <dbl> 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receiving_epa <dbl> NA, 0.4834648, 1.4372238, -0.5473667, -0.1…
#> $ receiving_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ racr <dbl> NA, 0.0, 3.2, 0.0, 0.0, 1.0, NA, NA, NA, N…
#> $ target_share <dbl> NA, 0.03125000, 0.03448276, 0.04545455, 0.…
#> $ air_yards_share <dbl> NA, -0.012396694, 0.094339623, 0.036885246…
#> $ wopr <dbl> NA, 0.03819731, 0.11776187, 0.09400149, 0.…
#> $ 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, 1.60, 0.00, 0.40, 6.10, 16.16,…
#> $ fantasy_points_ppr <dbl> 0.00, 1.80, 2.60, 0.00, 1.40, 7.10, 16.16,…
# }