Skip to contents

Load Player Level Weekly Stats

Usage

load_player_stats(..., qs = lifecycle::deprecated())

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 or kicking

file_type

One of c("rds", "csv","qs", "parquet"). Can also be set globally with options(nflreadr.prefer)

qs

[Deprecated] has no effect and will be removed in a future release.

Value

A tibble of week-level player statistics that aims to match NFL official box scores.

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: 5,698
#> Columns: 48
#> $ player_id                   <chr> "00-0019596", "00-0019596", "00-0019596", …
#> $ player_name                 <chr> "T.Brady", "T.Brady", "T.Brady", "T.Brady"…
#> $ recent_team                 <chr> "TB", "TB", "TB", "TB", "TB", "TB", "TB", …
#> $ season                      <int> 2021, 2021, 2021, 2021, 2021, 2021, 2021, …
#> $ week                        <int> 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14…
#> $ season_type                 <chr> "REG", "REG", "REG", "REG", "REG", "REG", …
#> $ completions                 <int> 32, 24, 41, 22, 30, 34, 20, 28, 23, 30, 25…
#> $ attempts                    <int> 50, 36, 55, 43, 41, 42, 36, 40, 34, 46, 34…
#> $ passing_yards               <dbl> 379, 276, 432, 269, 411, 297, 211, 375, 22…
#> $ passing_tds                 <int> 4, 5, 1, 0, 5, 2, 4, 4, 2, 2, 1, 4, 2, 0, …
#> $ interceptions               <dbl> 2, 0, 0, 0, 0, 1, 0, 2, 2, 1, 1, 1, 0, 1, …
#> $ sacks                       <dbl> 0, 3, 3, 1, 2, 0, 0, 3, 0, 0, 2, 0, 2, 4, …
#> $ sack_yards                  <dbl> 0, 17, 21, 8, 15, 0, 0, 25, 0, 0, 9, 0, 12…
#> $ sack_fumbles                <int> 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, …
#> $ sack_fumbles_lost           <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, …
#> $ passing_air_yards           <dbl> 446, 347, 382, 459, 421, 283, 281, 340, 20…
#> $ passing_yards_after_catch   <dbl> 176, 88, 238, 109, 225, 191, 75, 205, 113,…
#> $ passing_first_downs         <dbl> 22, 14, 24, 12, 24, 17, 12, 13, 8, 16, 11,…
#> $ passing_epa                 <dbl> 14.0069873, 1.8543642, 13.1633025, 2.24520…
#> $ passing_2pt_conversions     <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ dakota                      <dbl> 0.168449136, 0.118403623, 0.137870759, 0.0…
#> $ carries                     <int> 0, 1, 3, 4, 1, 4, 0, 1, 1, 1, 2, 1, 7, 1, …
#> $ rushing_yards               <dbl> 0, 6, 14, 3, 13, 1, 0, 2, 2, 10, 2, -1, 16…
#> $ rushing_tds                 <int> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, …
#> $ rushing_fumbles             <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, …
#> $ rushing_fumbles_lost        <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, …
#> $ rushing_first_downs         <dbl> 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 4, 0, …
#> $ rushing_epa                 <dbl> NA, 1.2840404, 0.5629274, 1.6620587, 0.865…
#> $ 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, …
#> $ special_teams_tds           <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ fantasy_points              <dbl> 27.16, 29.64, 28.68, 11.06, 37.74, 17.98, …
#> $ fantasy_points_ppr          <dbl> 27.16, 29.64, 28.68, 11.06, 37.74, 17.98, …
#> $ pacr                        <dbl> 0.8497758, 0.7953890, 1.1308901, 0.5860566…
#> $ 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…
# }