Skip to content

Commit

Permalink
updates to data-raw
Browse files Browse the repository at this point in the history
  • Loading branch information
tanho63 committed Aug 26, 2023
1 parent 8f3193f commit 179f357
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions data-raw/fp_injury_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ library(tidyverse)
library(mgcv)
library(ffscrapr)
library(ffsimulator)
# pkgload::load_all()

conn <- mfl_connect(2021, 47747)
base_seasons <- 2010:nflreadr::most_recent_season()
base_seasons <- seq(2010, nflreadr::most_recent_season())
scoring_history <- ff_scoringhistory(conn, base_seasons)

model_gam <- function(data) {
gam(games_played_rate ~ s(rank, bs = "cs"), data = data)
}
model_gam <- function(data) mgcv::gam(games_played_rate ~ mgcv::s(rank, bs = "cs"), data = data)

fp_injury_table <- ffsimulator::fp_rankings_history %>%
dplyr::select(-"page_pos") %>%
Expand Down
4 changes: 2 additions & 2 deletions data-raw/fp_rankings_history.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ fp_rankings_history2 <- crossing(pages2, seasons2) %>%
) %>%
filter(page_pos == pos)

fp_rankings_history <- bind_rows(fp_rankings_history2, fp_rankings_history)
.fp_rankings_history <- bind_rows(fp_rankings_history2, fp_rankings_history)

usethis::use_data(fp_rankings_history, overwrite = TRUE)
usethis::use_data(.fp_rankings_history, overwrite = TRUE)

0 comments on commit 179f357

Please sign in to comment.