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

Copa de la Liga Argentina: Could not find any URLs matching input parameters #378

Open
laziob opened this issue May 15, 2024 · 1 comment

Comments

@laziob
Copy link

laziob commented May 15, 2024


Im running worldfootballR version 0.6.5.0004 to pull player data from Argentina's Copa de la Liga Proesional from this year https://fbref.com/en/comps/905/Copa-de-la-Liga-Profesional-Stats

The comp is listed under https://fbref.com/en/comps/ as https://fbref.com/en/comps/905/history/Copa-de-la-Liga-Profesional-Seasons but when I pass that url under non_dom_league_url it throughs the title error.

From debugging it seems that the reason is that this competition is listed under "Domestic Cups" on the Seasons dataframe. Im not sure whether there is a function to get Domestic Cups data, couldnt find one, and it seems its not possible to get those from tuning the fb_league_stats parameters.

Now this might sound weird but, the Copa de la Liga, is actually a mix between a League, and a Cup. The format starts as a League where teams are divided into 2 groups. Each team faces all other teams just one time, and then the top 4 of each group move to a knockout face, thats why its called the way it is, is both a league AND a cup (yes, Its horrible I know). But by most standards it is a "league" for the most part so I dont think it should be labeled as a Domestic Cup.

Is there any way to either get the data with some other function, or move it to Domestic League status?

Thanks!

library(worldfootballR)
packageVersion("worldfootballR")

Argentina2024Stats <- fb_league_stats(
  country = "ARG",
  gender = "M",
  season_end_year = 2024,
  tier = "1st",
  stat_type = "standard",
  team_or_player = "player"
)

sessionInfo()
@tonyelhabr
Copy link
Collaborator

Hmm I think you're right. There's not really a correct way of getting this data right now.

I don't think it should be too hard to implement. We just need to come up with the right generalization for a solution. Perhaps a dom_league_url parameter could be added, or is_dom_cup parameter.

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