Skip to contents

Load Player Level Weekly Stats

Usage

load_player_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 with options(nflreadr.prefer)

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{
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,222
#> Columns: 53
#> $ player_id                   <chr> "00-0023459", "00-0023459", "00-0023459", …
#> $ player_name                 <chr> "A.Rodgers", "A.Rodgers", "A.Rodgers", "A.…
#> $ player_display_name         <chr> "Aaron Rodgers", "Aaron Rodgers", "Aaron R…
#> $ 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/upload/f…
#> $ recent_team                 <chr> "NYJ", "NYJ", "NYJ", "NYJ", "NYJ", "NYJ", …
#> $ season                      <int> 2024, 2024, 2024, 2024, 2024, 2024, 2024, …
#> $ week                        <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14,…
#> $ season_type                 <chr> "REG", "REG", "REG", "REG", "REG", "REG", …
#> $ opponent_team               <chr> "SF", "TEN", "NE", "DEN", "MIN", "BUF", "P…
#> $ completions                 <int> 13, 18, 27, 24, 29, 23, 24, 17, 22, 22, 22…
#> $ attempts                    <int> 21, 30, 35, 42, 54, 35, 39, 28, 32, 35, 29…
#> $ passing_yards               <dbl> 167, 176, 281, 225, 244, 294, 276, 233, 21…
#> $ passing_tds                 <int> 1, 2, 2, 0, 2, 2, 1, 2, 3, 0, 2, 2, 1, 3, …
#> $ interceptions               <dbl> 1, 0, 0, 0, 3, 1, 2, 0, 0, 0, 0, 1, 0, 0, …
#> $ sacks                       <dbl> 1, 2, 2, 5, 3, 3, 1, 1, 2, 3, 3, 2, 3, 1, …
#> $ sack_yards                  <dbl> 5, 12, 14, 41, 26, 22, 7, 9, 18, 23, 22, 1…
#> $ sack_fumbles                <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, …
#> $ sack_fumbles_lost           <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, …
#> $ passing_air_yards           <dbl> 164, 167, 226, 306, 410, 257, 203, 274, 18…
#> $ passing_yards_after_catch   <dbl> 93, 96, 152, 96, 123, 138, 186, 67, 112, 8…
#> $ passing_first_downs         <dbl> 8, 9, 16, 10, 13, 12, 13, 12, 11, 10, 7, 1…
#> $ passing_epa                 <dbl> 3.2582828, 1.6537689, 18.2047846, -12.0875…
#> $ passing_2pt_conversions     <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, …
#> $ pacr                        <dbl> 1.0182927, 1.0538922, 1.2433628, 0.7352941…
#> $ dakota                      <dbl> 0.066574278, 0.040780192, 0.257863436, -0.…
#> $ carries                     <int> 1, 2, 3, 5, 0, 0, 0, 0, 1, 0, 1, 2, 0, 6, …
#> $ rushing_yards               <dbl> -1, 1, 18, 26, 0, 0, 0, 0, -1, 0, 7, 6, 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, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, …
#> $ rushing_epa                 <dbl> 0.0000000, -0.3271411, 1.4149843, -0.57036…
#> $ 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> 8.58, 15.14, 21.04, 11.60, 11.76, 17.76, 1…
#> $ fantasy_points_ppr          <dbl> 8.58, 15.14, 21.04, 11.60, 11.76, 17.76, 1…
# }