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
orkicking
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{
stats <- load_player_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.
dplyr::glimpse(stats)
#> Rows: 944
#> Columns: 52
#> $ player_id <chr> "00-0019596", "00-0019596", "00-0019596", …
#> $ player_name <chr> "T.Brady", "T.Brady", "T.Brady", "A.Rodger…
#> $ player_display_name <chr> "Tom Brady", "Tom Brady", "Tom Brady", "Aa…
#> $ position <chr> "QB", "QB", "QB", "QB", "QB", "QB", "QB", …
#> $ position_group <chr> "QB", "QB", "QB", "QB", "QB", "QB", "QB", …
#> $ headshot_url <chr> "https://static.www.nfl.com/image/private/…
#> $ recent_team <chr> "TB", "TB", "TB", "GB", "GB", "GB", "IND",…
#> $ season <int> 2022, 2022, 2022, 2022, 2022, 2022, 2022, …
#> $ week <int> 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, …
#> $ season_type <chr> "REG", "REG", "REG", "REG", "REG", "REG", …
#> $ completions <int> 18, 18, 31, 22, 19, 27, 32, 16, 27, 37, 26…
#> $ attempts <int> 27, 34, 42, 34, 25, 35, 50, 30, 37, 59, 44…
#> $ passing_yards <dbl> 212, 190, 271, 195, 234, 255, 352, 195, 22…
#> $ passing_tds <int> 1, 1, 1, 0, 2, 2, 1, 0, 2, 1, 4, 0, 1, 3, …
#> $ interceptions <dbl> 1, 0, 0, 1, 0, 1, 1, 3, 0, 1, 0, 2, 3, 2, …
#> $ sacks <dbl> 2, 1, 3, 4, 3, 1, 2, 5, 5, 3, 2, 4, 7, 1, …
#> $ sack_yards <dbl> 17, 2, 20, 33, 23, 7, 12, 31, 45, 12, 15, …
#> $ sack_fumbles <int> 0, 0, 0, 1, 0, 0, 2, 1, 2, 0, 1, 3, 1, 0, …
#> $ sack_fumbles_lost <int> 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 2, 0, 0, …
#> $ passing_air_yards <dbl> 305, 318, 236, 190, 139, 177, 317, 256, 16…
#> $ passing_yards_after_catch <dbl> 87, 81, 124, 134, 130, 178, 172, 64, 116, …
#> $ passing_first_downs <dbl> 9, 8, 15, 9, 10, 11, 20, 6, 12, 18, 15, 13…
#> $ passing_epa <dbl> 1.050854, 2.428707, 1.076749, -11.627545, …
#> $ passing_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ pacr <dbl> 0.6950820, 0.5974843, 1.1483051, 1.0263158…
#> $ dakota <dbl> 0.075632258, -0.020727389, 0.085962743, 0.…
#> $ carries <int> 2, 3, 1, 1, 5, 1, 4, 0, 3, 1, 2, 0, 1, 0, …
#> $ rushing_yards <dbl> -1, -2, -1, -1, 10, -1, 12, 0, 4, 0, 6, 0,…
#> $ rushing_tds <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ rushing_fumbles <dbl> 0, 1, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, …
#> $ rushing_fumbles_lost <dbl> 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, …
#> $ rushing_first_downs <dbl> 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, …
#> $ rushing_epa <dbl> -1.4371675, -7.1154068, 0.0000000, 0.00000…
#> $ rushing_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receptions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ targets <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receiving_yards <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receiving_tds <int> 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receiving_yards_after_catch <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receiving_first_downs <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receiving_epa <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ receiving_2pt_conversions <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ racr <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ target_share <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ air_yards_share <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ wopr <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ special_teams_tds <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ fantasy_points <dbl> 10.38, 9.40, 14.74, 3.70, 16.36, 16.10, 15…
#> $ fantasy_points_ppr <dbl> 10.38, 9.40, 14.74, 3.70, 16.36, 16.10, 15…
# }