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

always choose the first table #391

Merged
merged 2 commits into from
Jul 21, 2024
Merged

always choose the first table #391

merged 2 commits into from
Jul 21, 2024

Conversation

tonyelhabr
Copy link
Collaborator

Fixes #389. Prior PR assumed that competition_name in all_seasons.csv would match what is shown on the FBRef page, but that doesn't always turn out to be the case, e.g. Bundesliga. I've made a change to remove string searching, and instead assume the points table is always the first on the page. I'm 99% sure that this should work for all leagues, although I haven't tested it comprehensively.

Confirmed that this works.

fb_season_team_stats(
  ## USA is an odd case since it has conferences, so its table shows "Regular Season"
  country = c("ENG", "ESP", "GER", "ITA", "FRA", "USA"),
  gender = "M",
  season_end_year = c(2013:2024),
  tier = "1st",
  stat_type = "league_table",
  time_pause = 5
)

@JaseZiv
Copy link
Owner

JaseZiv commented Jul 21, 2024

@tonyelhabr I'm happy for us to push this through and assume the first table on a page is what we're after for now and then we'll just monitor it...

Should we increment a minor version also?

@tonyelhabr
Copy link
Collaborator Author

tonyelhabr commented Jul 21, 2024

@tonyelhabr I'm happy for us to push this through and assume the first table on a page is what we're after for now and then we'll just monitor it...

Should we increment a minor version also?

i was intentionally not bumping the version since this change was related to the last one, but there's no harm in incrementing again. just pushed it

@JaseZiv JaseZiv merged commit fdbb082 into main Jul 21, 2024
0 of 2 checks passed
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

Successfully merging this pull request may close these issues.

fb_season_team_stats() returning error when stat_type = "league_table"
2 participants