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
.for_cran()
# \donttest{
try({ # prevents CRAN errors
load_snap_counts()
})
#> ── nflverse snap counts ────────────────────────────────────────────────────────
#> ℹ Data updated: 2023-10-10 12:32:21 UTC
#> # A tibble: 7,245 × 16
#> game_id pfr_game_id season game_type week player pfr_player_id position
#> <chr> <chr> <int> <chr> <int> <chr> <chr> <chr>
#> 1 2023_01_ARI… 202309100w… 2023 REG 1 Saahd… CharSa00 T
#> 2 2023_01_ARI… 202309100w… 2023 REG 1 Andre… WyliAn00 G
#> 3 2023_01_ARI… 202309100w… 2023 REG 1 Charl… LenoCh00 T
#> 4 2023_01_ARI… 202309100w… 2023 REG 1 Sam H… HoweSa00 QB
#> 5 2023_01_ARI… 202309100w… 2023 REG 1 Nick … GateNi00 C
#> 6 2023_01_ARI… 202309100w… 2023 REG 1 Samue… CosmSa00 T
#> 7 2023_01_ARI… 202309100w… 2023 REG 1 Terry… McLaTe00 WR
#> 8 2023_01_ARI… 202309100w… 2023 REG 1 Jahan… DotsJa00 WR
#> 9 2023_01_ARI… 202309100w… 2023 REG 1 Logan… ThomLo00 TE
#> 10 2023_01_ARI… 202309100w… 2023 REG 1 Curti… SamuCu00 WR
#> # ℹ 7,235 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>
# }