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: 18
#> Columns: 53
#> $ player_id                   <chr> "00-0030506", "00-0031549", "00-0032764", …
#> $ player_name                 <chr> "T.Kelce", "N.Agholor", "D.Henry", "S.Peri…
#> $ player_display_name         <chr> "Travis Kelce", "Nelson Agholor", "Derrick…
#> $ position                    <chr> "TE", "WR", "RB", "RB", "WR", "QB", "WR", …
#> $ position_group              <chr> "TE", "WR", "RB", "RB", "WR", "QB", "WR", …
#> $ headshot_url                <chr> "https://static.www.nfl.com/image/upload/f…
#> $ recent_team                 <chr> "KC", "BAL", "BAL", "KC", "KC", "KC", "KC"…
#> $ season                      <int> 2024, 2024, 2024, 2024, 2024, 2024, 2024, …
#> $ week                        <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
#> $ season_type                 <chr> "REG", "REG", "REG", "REG", "REG", "REG", …
#> $ opponent_team               <chr> "BAL", "KC", "KC", "BAL", "BAL", "BAL", "B…
#> $ completions                 <int> 0, 0, 0, 0, 0, 20, 0, 0, 26, 0, 0, 0, 0, 0…
#> $ attempts                    <int> 0, 0, 0, 0, 0, 28, 0, 0, 41, 0, 0, 0, 0, 0…
#> $ passing_yards               <dbl> 0, 0, 0, 0, 0, 291, 0, 0, 273, 0, 0, 0, 0,…
#> $ passing_tds                 <int> 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, …
#> $ interceptions               <dbl> 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ sacks                       <dbl> 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, …
#> $ sack_yards                  <dbl> 0, 0, 0, 0, 0, 10, 0, 0, 6, 0, 0, 0, 0, 0,…
#> $ sack_fumbles                <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, …
#> $ sack_fumbles_lost           <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, …
#> $ passing_air_yards           <dbl> 0, 0, 0, 0, 0, 165, 0, 0, 267, 0, 0, 0, 0,…
#> $ passing_yards_after_catch   <dbl> 0, 0, 0, 0, 0, 188, 0, 0, 166, 0, 0, 0, 0,…
#> $ passing_first_downs         <dbl> 0, 0, 0, 0, 0, 15, 0, 0, 11, 0, 0, 0, 0, 0…
#> $ passing_epa                 <dbl> NA, NA, NA, NA, NA, 11.08441, NA, NA, -2.4…
#> $ passing_2pt_conversions     <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ pacr                        <dbl> NA, NA, NA, NA, NA, 1.763636, NA, NA, 1.02…
#> $ dakota                      <dbl> NA, NA, NA, NA, NA, 0.21475525, NA, NA, 0.…
#> $ carries                     <int> 0, 0, 13, 0, 0, 2, 0, 0, 16, 1, 0, 0, 15, …
#> $ rushing_yards               <dbl> 0, 0, 46, 0, 0, 3, 0, 0, 122, 3, 0, 0, 45,…
#> $ 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, 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, 5, 0, 0, 1, 0, 0, 7, 1, 0, 0, 2, 0, …
#> $ rushing_epa                 <dbl> NA, NA, 2.1925126, NA, NA, 1.0219927, NA, …
#> $ rushing_2pt_conversions     <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ receptions                  <int> 3, 1, 0, 1, 0, 1, 1, 2, 0, 6, 2, 3, 2, 9, …
#> $ targets                     <int> 4, 1, 2, 2, 1, 1, 1, 2, 0, 8, 5, 3, 3, 12,…
#> $ receiving_yards             <dbl> 34, 6, 0, 10, 0, 2, 25, 14, 0, 52, 53, 37,…
#> $ receiving_tds               <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, …
#> $ 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> 27, 6, -10, -4, 13, -1, 15, 11, 0, -12, 12…
#> $ receiving_yards_after_catch <dbl> 10, 0, 0, 13, 0, 3, 10, 3, 0, 59, 5, 16, 4…
#> $ receiving_first_downs       <dbl> 2, 0, 0, 1, 0, 0, 1, 1, 0, 2, 2, 2, 2, 5, …
#> $ receiving_epa               <dbl> 3.4729155, 0.1412736, -1.4453137, -0.74787…
#> $ receiving_2pt_conversions   <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ racr                        <dbl> 1.2592593, 1.0000000, 0.0000000, -2.500000…
#> $ target_share                <dbl> 0.14814815, 0.02500000, 0.05000000, 0.0740…
#> $ air_yards_share             <dbl> 0.16875000, 0.02247191, -0.03745318, -0.02…
#> $ wopr                        <dbl> 0.34034722, 0.05323034, 0.04878277, 0.0936…
#> $ special_teams_tds           <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ fantasy_points              <dbl> 3.40, 0.60, 10.60, 1.00, 0.00, 14.14, 2.50…
#> $ fantasy_points_ppr          <dbl> 6.40, 1.60, 10.60, 2.00, 0.00, 15.14, 3.50…
# }