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

fg_batter_game_logs no longer working #314

Open
bjohara1 opened this issue Sep 22, 2023 · 6 comments
Open

fg_batter_game_logs no longer working #314

bjohara1 opened this issue Sep 22, 2023 · 6 comments

Comments

@bjohara1
Copy link

The function fg_batter_game_logs is no longer working. Example:

fg_batter_game_logs(playerid = 15640, year = 2023)
Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: cdn.fangraphs.com
Request failed [ERROR]. Retrying in 1.5 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: cdn.fangraphs.com
Request failed [ERROR]. Retrying in 1 seconds...
2023-09-22 06:58:17: Invalid arguments or no batter game logs data available!
Error in fg_batter_game_logs(playerid = 15640, year = 2023) :
object 'payload' not found

@cartergunning
Copy link

Same problem with fg_pitcher_game_logs. Trying to use this data for a project so would really appreciate if someone were able to fix this!

@robert-frey
Copy link
Contributor

Here's a temporary solution for y'all: MLB Game Logs in R!
https://youtu.be/2WcYK_TFDHE

@cartergunning
Copy link

Thank you! This was helpful! Quick follow up. If I wanted to use this temporary solution and get all the game logs of players that have played up until the 2023 season in one single dataset how would I go about doing that?!

@Coop197823
Copy link

So is this something that will be fixed before the season starts? I am hoping to use these stats that are specific from Fangraphs

@a-meyers
Copy link
Contributor

fangraphs migrated from all cdn.fangraphs.com/api/ endpoints to http://www.fangraphs.com/api/. The underlying endpoint for the fg_xxx_game_logs functions need to be updated.

@saiemgilani
Copy link
Collaborator

Yeah, I already resolved this. Update your package

install.packages("baseballr")

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

6 participants