Skip to content

Commit

Permalink
fixed team logos call
Browse files Browse the repository at this point in the history
  • Loading branch information
danmorse314 committed Mar 4, 2024
1 parent 4263aa7 commit 2a1cc2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/get_game_ids.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
get_game_ids <- function(season = NULL, day = as.Date(Sys.Date(), "%Y-%m-%d")){

# load team abbreviations
team_info <- team_logos_colors
team_info <- hockeyR::team_logos_colors

if(is.null(season)){

Expand Down Expand Up @@ -108,7 +108,8 @@ get_game_ids <- function(season = NULL, day = as.Date(Sys.Date(), "%Y-%m-%d")){
dplyr::select(
game_id = id, season_full = season, game_time, gameType,
homeTeam, awayTeam, date
)
) %>%
dplyr::distinct()

# check if game has a score attached to the teams
if("score" %in% names(dplyr::tibble(game_id_list$homeTeam)%>%tidyr::unnest_wider(1))){
Expand Down

0 comments on commit 2a1cc2c

Please sign in to comment.