Skip to contents

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 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

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: 2022-09-28 09:21:00 UTC
#> # A tibble: 0 × 40
#> # … with 40 variables: season <int>, week <int>, season_type <chr>, team <chr>,
#> #   player_name <chr>, player_id <chr>, fg_made <int>, fg_missed <int>,
#> #   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>, …
# }