Skip to content

Commit

Permalink
update draft data
Browse files Browse the repository at this point in the history
  • Loading branch information
danmorse314 committed Nov 24, 2024
1 parent 1565f8c commit e97a2bc
Show file tree
Hide file tree
Showing 3 changed files with 12,435 additions and 1,045 deletions.
11 changes: 10 additions & 1 deletion get_draft_class.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
get_draft_class <- function(season = as.integer(format(Sys.Date(), "%Y"))){

message(paste("\npulling draft data for",season,"season..."))

# names for final df
df_names <- c(
"round","pick","team","player","pos_pfr","draft_age","last_season",
Expand Down Expand Up @@ -39,5 +41,12 @@ get_draft_class <- function(season = as.integer(format(Sys.Date(), "%Y"))){

draft <- utils::type.convert(draft, as.is = "TRUE")

# sacks weren't a thing before 95 I guess
if(is.character(draft$sacks[1])){
draft <- draft |>
dplyr::select(-college) |>
dplyr::rename(college = sacks)
}

return(draft)
}
}
Loading

0 comments on commit e97a2bc

Please sign in to comment.