Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

March 2024 NHL API Update Impacting scrape_game #16

Open
RealZLock opened this issue Mar 7, 2024 · 2 comments
Open

March 2024 NHL API Update Impacting scrape_game #16

RealZLock opened this issue Mar 7, 2024 · 2 comments

Comments

@RealZLock
Copy link

hi, a few other scrapers on twitter have discussed this, but this week there was an update to the NHL API that has moved some things like play-by-play period number and some boxscore information. Getting "WARNING: src/learner.cc:1517: Empty dataset at worker: 0" when using the scrape_game function and just have a ton of blank columns, most important being game_seconds and period on the play-by-play data.

thanks!

@RealZLock
Copy link
Author

this adjustment to scrape_game function fixes it as far as i can tell

unnest game plays

plays <- site$plays %>%
dplyr::tibble() %>%
tidyr::unnest_wider(1) %>%
dplyr::select(-c(typeCode)) %>%
tidyr::unnest_wider(details) %>%
tidyr::unnest_wider(periodDescriptor) %>%
dplyr::rename(period=number)

@Saarialho
Copy link

Might be related to this, I see 53 col names that are not in 2023 data and 28 col names from 2023 that are not in 2024 data. The xG variable, for example, is missing totally from the Mar 9, 2024 updated pbp data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants