Loads game level snap counts stats provided by Pro Football Reference starting with the 2012 season.
Usage
load_snap_counts(
seasons = most_recent_season(),
file_type = getOption("nflreadr.prefer", default = "rds")
)
Arguments
- seasons
a numeric vector specifying what seasons to return, if
TRUE
returns all available data- 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_snap_counts.html for the web data dictionary
dictionary_snap_counts
for the data dictionary as bundled within the package
Issues with this data should be filed here: https://github.com/nflverse/nflverse-pfr
Examples
# \donttest{
try({ # prevents CRAN errors
load_snap_counts()
})
#> ── nflverse snap counts ────────────────────────────────────────────────────────
#> ℹ Data updated: 2023-02-13 18:28:12 UTC
#> # A tibble: 26,340 × 16
#> game_id pfr_game_id season game_type week player pfr_player_id position
#> <chr> <chr> <int> <chr> <int> <chr> <chr> <chr>
#> 1 2022_01_BAL… 202209110n… 2022 REG 1 Max M… MitcMa02 T
#> 2 2022_01_BAL… 202209110n… 2022 REG 1 Laken… TomlLa01 G
#> 3 2022_01_BAL… 202209110n… 2022 REG 1 Alija… VeraAl00 G
#> 4 2022_01_BAL… 202209110n… 2022 REG 1 Georg… FantGe00 T
#> 5 2022_01_BAL… 202209110n… 2022 REG 1 Conno… McGoCo00 C
#> 6 2022_01_BAL… 202209110n… 2022 REG 1 Joe F… FlacJo00 QB
#> 7 2022_01_BAL… 202209110n… 2022 REG 1 Tyler… ConkTy00 TE
#> 8 2022_01_BAL… 202209110n… 2022 REG 1 Elija… MoorEl00 WR
#> 9 2022_01_BAL… 202209110n… 2022 REG 1 Corey… DaviCo03 WR
#> 10 2022_01_BAL… 202209110n… 2022 REG 1 Micha… CartMi03 RB
#> # ℹ 26,330 more rows
#> # ℹ 8 more variables: team <chr>, opponent <chr>, offense_snaps <dbl>,
#> # offense_pct <dbl>, defense_snaps <dbl>, defense_pct <dbl>, st_snaps <dbl>,
#> # st_pct <dbl>
# }