View source: R/load_nextgen_stats.R
load_nextgen_stats | R Documentation |
Loads player level weekly stats provided by NFL Next Gen Stats starting with the 2016 season. Three different stat types are available and the current season's data updates every night. NGS will only provide data for players above a minimum number of pass/rush/rec attempts.
load_nextgen_stats(
seasons = TRUE,
stat_type = c("passing", "receiving", "rushing"),
file_type = getOption("nflreadr.prefer", default = "rds")
)
seasons |
a numeric vector specifying what seasons to return, if |
stat_type |
one of |
file_type |
One of |
A tibble of week-level player statistics provided by NFL Next Gen Stats.
Regular season summary is given for week == 0
.
https://nextgenstats.nfl.com/stats/passing for stat_type = "passing"
https://nextgenstats.nfl.com/stats/receiving for stat_type = "receiving"
https://nextgenstats.nfl.com/stats/rushing for stat_type = "rushing"
https://nflreadr.nflverse.com/articles/dictionary_nextgen_stats.html for a web version of the data dictionary
dictionary_nextgen_stats
for the data dictionary as bundled within the package
Issues with this data should be filed here: https://github.com/nflverse/nflverse-data
try({ # prevents cran errors
load_nextgen_stats(stat_type = "passing")
load_nextgen_stats(stat_type = "receiving")
load_nextgen_stats(stat_type = "rushing")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.