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 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{
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: 3,554
#> Columns: 52
#> $ player_id                   <chr> "00-0019596", "00-0019596", "00-0019596", …
#> $ player_name                 <chr> "T.Brady", "T.Brady", "T.Brady", "T.Brady"…
#> $ player_display_name         <chr> "Tom Brady", "Tom Brady", "Tom Brady", "To…
#> $ 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", "TB", "TB", "TB", "TB", …
#> $ season                      <int> 2022, 2022, 2022, 2022, 2022, 2022, 2022, …
#> $ week                        <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 1, 2, 3…
#> $ season_type                 <chr> "REG", "REG", "REG", "REG", "REG", "REG", …
#> $ completions                 <int> 18, 18, 31, 39, 35, 25, 32, 26, 36, 22, 29…
#> $ attempts                    <int> 27, 34, 42, 52, 52, 40, 49, 44, 58, 29, 43…
#> $ passing_yards               <dbl> 212, 190, 271, 385, 351, 243, 290, 325, 28…
#> $ passing_tds                 <int> 1, 1, 1, 3, 1, 1, 0, 1, 1, 2, 2, 0, 2, 2, …
#> $ interceptions               <dbl> 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, …
#> $ sacks                       <dbl> 2, 1, 3, 1, 0, 2, 1, 3, 1, 0, 3, 4, 3, 1, …
#> $ sack_yards                  <dbl> 17, 2, 20, 12, 0, 14, 14, 20, 8, 0, 17, 33…
#> $ sack_fumbles                <int> 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, …
#> $ sack_fumbles_lost           <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, …
#> $ passing_air_yards           <dbl> 305, 318, 236, 326, 356, 302, 295, 288, 27…
#> $ passing_yards_after_catch   <dbl> 87, 81, 124, 205, 178, 87, 134, 177, 127, …
#> $ passing_first_downs         <dbl> 9, 8, 15, 23, 17, 11, 14, 13, 15, 15, 9, 9…
#> $ passing_epa                 <dbl> 1.0508536, 2.4287070, 1.0767493, 9.5113341…
#> $ passing_2pt_conversions     <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ pacr                        <dbl> 0.6950820, 0.5974843, 1.1483051, 1.1809816…
#> $ dakota                      <dbl> 0.0756322575, -0.0207273893, 0.0859627433,…
#> $ carries                     <int> 2, 3, 1, 0, 3, 1, 1, 1, 0, 6, 1, 1, 5, 1, …
#> $ rushing_yards               <dbl> -1, -2, -1, 0, -3, 0, 1, 1, 0, -3, 2, -1, …
#> $ rushing_tds                 <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ rushing_fumbles             <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, …
#> $ rushing_fumbles_lost        <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, …
#> $ rushing_first_downs         <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, …
#> $ rushing_epa                 <dbl> -1.4371675, -7.1154068, 0.0000000, NA, -3.…
#> $ 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, 1, 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, 16, 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, -4.726…
#> $ 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, 0.0000…
#> $ target_share                <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, 0.0344…
#> $ air_yards_share             <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, 0.0613…
#> $ wopr                        <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, 0.0946…
#> $ 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, 25.40, 19.74, 13.72, 1…
#> $ fantasy_points_ppr          <dbl> 10.38, 9.40, 14.74, 25.40, 19.74, 13.72, 1…
# }