knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

nflreadr provides a wide range of NFL related data. This is powered by an extensive, automated data infrastructure. This article provides information on update and availability schedules, as this is a pressing question for many nflverse users, especially right before the start of a season.

Automation Status

The following table reports on the status and last update times of nflverse data pipelines.

# 
# ONLY RUN IF WE NEED TO UPDATE THE LIST OF RELEASES!!!
# 
l <- piggyback::pb_list(repo = "nflverse/nflverse-data") 
data_releases <- l |>
  dplyr::filter(file_name %in% c("timestamp.json","")) |>
  dplyr::distinct(tag,file_name) |> 
  dplyr::mutate(
    url = glue::glue("https://github.com/nflverse/nflverse-data/releases/download/{tag}/timestamp.json"),
    badge = glue::glue("[![{tag}](https://img.shields.io/badge/dynamic/json?color=blue&label={paste0('load_',tag)}&query=last_updated&style=flat-square&url={URLencode(url)})](https://github.com/nflverse/nflverse-data/releases/tag/{tag})")) |> 
  dplyr::select(
    Data = tag,
    `Last Updated` = badge
  ) |> 
  dplyr::bind_rows(
    list(Data = "pbp_raw", `Last Updated` = "[![raw pbp data](https://img.shields.io/github/last-commit/nflverse/nflfastR-raw?label=Raw%20PBP%20Updated&style=flat-square)]()")
  )

nflversedata::nflverse_save(data_releases, "data_releases", "nflverse Data Releases", "misc", file_types = "rds")
update_times <- nflreadr::rds_from_url("https://github.com/nflverse/nflverse-data/releases/download/misc/data_releases.rds")

status <- tibble::tribble(
  ~Data, ~ Status,
  "pbp_raw", "![pbp_raw](https://img.shields.io/github/actions/workflow/status/nflverse/nflverse-pbp-internal/release_raw_pbp.yaml?label=raw_pbp_status&style=flat-square)",
  "pbp", "![pbp and ps](https://img.shields.io/github/actions/workflow/status/nflverse/nflverse-pbp/update_data.yaml?label=pbp_status&style=flat-square)",
  "player_stats", "![pbp and ps](https://img.shields.io/github/actions/workflow/status/nflverse/nflverse-pbp/update_data.yaml?label=ps_status&style=flat-square)",
  "rosters", "![rosters](https://img.shields.io/github/actions/workflow/status/nflverse/nflverse-rosters/update_rosters.yaml?label=rosters_status&style=flat-square)",
  "players", "![players](https://img.shields.io/github/actions/workflow/status/nflverse/nflverse-players/update_players.yaml?label=players_status&style=flat-square)",
  "snap_counts", "![snap_counts](https://img.shields.io/github/actions/workflow/status/nflverse/pfr_scrapR/update_snap_counts.yaml?label=snaps_status&style=flat-square)",
  "draft_picks", "![snap_counts](https://img.shields.io/github/actions/workflow/status/nflverse/pfr_scrapR/update_draft_picks.yaml?label=draft_status&style=flat-square)",
  "pfr_advstats", "![adv_stats](https://img.shields.io/github/actions/workflow/status/nflverse/pfr_scrapR/update_advanced_stats.yaml?label=advstats_status&style=flat-square)",
  "nextgen_stats", "![ngs](https://img.shields.io/github/actions/workflow/status/nflverse/ngs-data/update_ngs.yaml?label=ngs_status&style=flat-square)",
  "injuries", "![injuries](https://img.shields.io/github/actions/workflow/status/nflverse/nflverse-rosters/update_injuries.yaml?label=injuries_status&style=flat-square)",
  "depth_charts", "![depthcharts](https://img.shields.io/github/actions/workflow/status/nflverse/nflverse-rosters/update_depth_charts.yaml?label=depth_charts_status&style=flat-square)",
  "combine", "![combine](https://img.shields.io/github/actions/workflow/status/nflverse/pfr_scrapR/update_combine.yaml?label=combine_status&style=flat-square)",
  "nfl4th", "![nfl4th](https://img.shields.io/github/actions/workflow/status/nflverse/nfl4th/update_precompute.yaml?label=nfl4th_precompute&style=flat-square)",
  "ffverse player IDs", "![weekly-playerids](https://img.shields.io/github/actions/workflow/status/dynastyprocess/data/weekly-playerids.yml?label=ff_playerids&style=flat-square)",
  "ffverse rankings", "![weekly-fantasypros](https://img.shields.io/github/actions/workflow/status/dynastyprocess/data/weekly-fantasypros.yml?label=rankings&style=flat-square)",
  "contracts", "![contracts](https://img.shields.io/github/actions/workflow/status/nflverse/rotc/update_otc.yaml?label=contracts&style=flat-square)"
  ) |> 
  dplyr::left_join(update_times, by = "Data") |> 
  dplyr::mutate_all(tidyr::replace_na,"") |> 
  dplyr::mutate(Status = glue::glue("[{Status}]()"))
knitr::kable(status)

nflverse Play-by-Play Data

There are three ways to obtain nflverse pbp data.

  1. We recommend using nflreadr::load_pbp() or nflfastR::load_pbp() as the primary method of retrieving pbp data. This uses our automated data infrastructure to download clean data, and we update this on a nightly basis after each game day (and additionally at specific points on game days) during the season.
  2. If this is not quick enough, nflfastR::build_nflfastR_pbp() parses raw pbp json files we save, usually available within 15 minutes after a game has ended.
  3. If you have a SQL database, nflfastR::update_db() helps maintain a pbp database. It uses nflfastR::build_nflfastR_pbp() so can be run on the same schedule (i.e. within 15 minutes after a game has ended).

In all cases, it is recommended to update the data again during the night from Wednesday to Thursday in order to also receive the stat corrections that the NFL will incorporate from Monday to Wednesday at the latest. -> Thursday's load_pbp() is the cleanest data we have.

nflverse Player Level Weekly Stats

Weekly player stats (offense, defense, kicking) are computed using

with up to date nflverse pbp data. All player stats update every night (in the range of 3 am - 5 am ET) during the season.

nflverse-FTN Charting Data

ftn charting data updates every day at 0, 6, 12, 18 UTC during the season. The actual availability of new data depends on the update schedule of FTN.

nflverse Participation Data

Participation data is computed using unpublished code. The data source is gone and there won't be updates anymore.

nflverse Game/Schedule Data

Game/Schedule data updates very 5 minutes during the season.

nflverse Roster Data

Roster data updates every day at 7AM UTC.

Player Level Weekly NFL Next Gen Stats

Player level weekly stats provided by NFL Next Gen Stats update every night (in the range of 3 am - 5 am ET) during the season. The actual availability of new data depends on the update schedule of NGS.

PFR Snap Count Data

Snap Count data updates every day at 0, 6, 12, 18 UTC during the season. The actual availability of new data depends on the update schedule of PFR.

PFR Advanced Stats

PFR Advanced Stats updates every day at 7AM UTC during the season. The actual availability of new data depends on the update schedule of PFR.



nflverse/nflreadr documentation built on Nov. 29, 2024, 4:56 p.m.