Load Player Level Weekly Stats
Usage
load_player_stats(
seasons = most_recent_season(),
stat_type = c("offense", "kicking"),
file_type = getOption("nflreadr.prefer", default = "rds")
)
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
orkicking
- file_type
One of
c("rds", "qs", "csv", "parquet")
. Can also be set globally withoptions(nflreadr.prefer)
See also
https://nflreadr.nflverse.com/articles/dictionary_player_stats.html for a web version of the data dictionary
dictionary_player_stats
for the data dictionary
Issues with this data should be filed here: https://github.com/nflverse/nflverse-pbp
Examples
# \donttest{
try({ # prevents cran errors
load_player_stats()
load_player_stats(stat_type = "kicking")
})
#> ── nflverse player stats: kicking ──────────────────────────────────────────────
#> ℹ Data updated: 2023-01-06 09:10:40 UTC
#> # A tibble: 508 × 40
#> season week season_t…¹ team playe…² playe…³ fg_made fg_mi…⁴ fg_bl…⁵ fg_long
#> <int> <int> <chr> <chr> <chr> <chr> <int> <int> <int> <dbl>
#> 1 2022 1 REG ARI M.Prat… 00-002… 0 0 0 0
#> 2 2022 1 REG ATL Y.Koo 00-003… 4 0 1 54
#> 3 2022 1 REG BAL J.Tuck… 00-002… 1 0 0 24
#> 4 2022 1 REG BUF T.Bass 00-003… 1 0 0 41
#> 5 2022 1 REG CAR E.Pine… 00-003… 1 0 0 34
#> 6 2022 1 REG CHI C.Sant… 00-003… 0 0 0 0
#> 7 2022 1 REG CIN E.McPh… 00-003… 2 1 0 59
#> 8 2022 1 REG CLE C.York 00-003… 4 0 0 58
#> 9 2022 1 REG DAL B.Maher 00-003… 1 0 0 51
#> 10 2022 1 REG DEN B.McMa… 00-002… 3 1 0 40
#> # … with 498 more rows, 30 more variables: 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 <int>, gwfg_distance <dbl>,
#> # gwfg_made <int>, gwfg_missed <int>, gwfg_blocked <int>, 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>, fg_made_60_ <dbl>, fg_missed_0_19 <dbl>, …
# }