Skip to content

Commit

Permalink
Make 2024 adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb committed Sep 12, 2024
1 parent b4f30f1 commit f6850df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/update_qbr.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
schedule:
Expand All @@ -15,7 +13,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.NFLVERSE_GH_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
Expand All @@ -24,19 +22,9 @@ jobs:
jthomasmock/espnscrapeR
nflverse/nflverse-data
nflverse/nflreadr
ropensci/piggyback
purrr
tidyr
tibble
- name: Update QBR
run: Rscript -e 'source("auto/update_qbr.R")'

# REMOVE THIS AFTER THE 2023 SEASON!
- name: Commit updated data
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add data
git commit -m "Automated QBR stats updates `date`" || echo "No changes to commit"
git push || echo "No changes to commit"
17 changes: 0 additions & 17 deletions auto/update_qbr.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# piggyback::pb_release_create(
# repo = "nflverse/espnscrapeR-data",
# tag = "raw_qbr",
# body = "ESPN QBR Data by week and season"
# )

if(Sys.getenv("NFLVERSE_REBUILD", "false") == "true"){
seasons_to_scrape <- 2006:nflreadr::most_recent_season()
} else {
Expand Down Expand Up @@ -124,14 +118,3 @@ nflversedata::nflverse_save(
nflverse_type = "ESPN QBR",
release_tag = "espn_data"
)


# Save to git history for compatibility in 2023 ---------------------------
# DELETE THIS AFTER THE 2023 SEASON!

saveRDS(qbr_combined_season_level, "data/qbr-nfl-season.rds")
readr::write_csv(qbr_combined_season_level, "data/qbr-nfl-season.csv")

saveRDS(qbr_combined_week_level, "data/qbr-nfl-weekly.rds")
readr::write_csv(qbr_combined_week_level, "data/qbr-nfl-weekly.csv")

0 comments on commit f6850df

Please sign in to comment.