Load Player Level Weekly Stats

load_player_stats(
  seasons = most_recent_season(),
  stat_type = c("offense", "kicking"),
  file_type = getOption("nflreadr.prefer", default = "qs")
)

Arguments

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 "rds" or "qs". 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

https://www.nflfastr.com/reference/load_player_stats.html

https://github.com/nflverse/nflfastr-data

vignette("Data Dictionary - Player Stats") for the data dictionary

Examples

# \donttest{ load_player_stats()
#> # A tibble: 2,131 × 48 #> player_id player_name recent_team season week season_type completions #> <chr> <chr> <chr> <int> <int> <chr> <int> #> 1 00-0019596 T.Brady TB 2021 1 REG 32 #> 2 00-0019596 T.Brady TB 2021 2 REG 24 #> 3 00-0019596 T.Brady TB 2021 3 REG 41 #> 4 00-0019596 T.Brady TB 2021 4 REG 22 #> 5 00-0019596 T.Brady TB 2021 5 REG 30 #> 6 00-0019596 T.Brady TB 2021 6 REG 34 #> 7 00-0019596 T.Brady TB 2021 7 REG 20 #> 8 00-0022924 B.Roethlisberger PIT 2021 1 REG 18 #> 9 00-0022924 B.Roethlisberger PIT 2021 2 REG 27 #> 10 00-0022924 B.Roethlisberger PIT 2021 3 REG 38 #> # … with 2,121 more rows, and 41 more variables: attempts <int>, #> # passing_yards <dbl>, passing_tds <int>, interceptions <dbl>, sacks <dbl>, #> # sack_yards <dbl>, sack_fumbles <int>, sack_fumbles_lost <int>, #> # passing_air_yards <dbl>, passing_yards_after_catch <dbl>, #> # passing_first_downs <dbl>, passing_epa <dbl>, #> # passing_2pt_conversions <int>, dakota <dbl>, carries <int>, #> # rushing_yards <dbl>, rushing_tds <int>, rushing_fumbles <dbl>, …
load_player_stats(stat_type = "kicking")
#> # A tibble: 209 × 40 #> season week season_type team player_name player_id fg_made fg_missed #> <int> <int> <chr> <chr> <chr> <chr> <int> <int> #> 1 2021 1 REG ARI M.Prater 00-0023853 1 1 #> 2 2021 1 REG ATL Y.Koo 00-0033702 2 0 #> 3 2021 1 REG BAL J.Tucker 00-0029597 2 0 #> 4 2021 1 REG BUF T.Bass 00-0036162 3 0 #> 5 2021 1 REG CAR R.Santoso 00-0034648 2 0 #> 6 2021 1 REG CHI C.Santos 00-0031203 0 0 #> 7 2021 1 REG CIN E.McPherson 00-0036854 2 0 #> 8 2021 1 REG CLE C.McLaughlin 00-0035358 0 0 #> 9 2021 1 REG DAL G.Zuerlein 00-0029621 3 2 #> 10 2021 1 REG DEN B.McManus 00-0029822 2 0 #> # … with 199 more rows, and 32 more variables: fg_blocked <int>, fg_long <dbl>, #> # fg_att <dbl>, fg_pct <dbl>, pat_made <int>, pat_missed <int>, #> # pat_blocked <int>, pat_att <dbl>, pat_pct <dbl>, fg_made_distance <dbl>, #> # fg_missed_distance <dbl>, fg_blocked_distance <dbl>, gwfg_att <dbl>, #> # gwfg_distance <dbl>, gwfg_made <dbl>, gwfg_missed <dbl>, #> # gwfg_blocked <dbl>, fg_made_0_19 <dbl>, fg_made_20_29 <dbl>, #> # fg_made_30_39 <dbl>, fg_made_40_49 <dbl>, fg_made_50_59 <dbl>, …
# }