Skip to content

Commit

Permalink
Update update-players.R
Browse files Browse the repository at this point in the history
  • Loading branch information
john-b-edwards committed Sep 13, 2023
1 parent 9c195ad commit ad88107
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/update-players.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ build_players <- function() {
weight == '' ~ NA_integer_,
weight == 0 ~ NA_integer_,
T ~ as.integer(weight)
)
),
# fixing inconsistent birthday formatting
birth_date_1 = lubridate::ymd(birth_date),
birth_date_2 = lubridate::mdy(birth_date),
birth_date = dplyr::coalesce(birth_date_1, birth_date_2),
birth_date = as.character(birth_date)
) |>
dplyr::select(-c(birth_date_1,birth_date_2)) |>
tidyr::separate(
height,
fill = "left",
Expand Down

0 comments on commit ad88107

Please sign in to comment.