JaseZiv/worldfootballR

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

Opened this issue · 1 comments


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()

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.