probberechts / soccerdata

⛏⚽ Scrape soccer data from Club Elo, ESPN, FBref, FiveThirtyEight, Football-Data.co.uk, FotMob, Sofascore, SoFIFA, Understat and WhoScored.

Home Page:https://soccerdata.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FBref] Available leagues in docs do not match current FBref available leagues

ethanfinkel opened this issue · comments

Hey team,

I found this issue in the docs as I was getting set up and thought I'd flag it. Awesome package by the way!

The docs have instructions for pulling EPL data from FBref, but the EPL is not a valid league for FBref currently. This leads to an error when following the docs verbatim.

Docs

Screenshot 2024-07-05 at 10 59 23 AM Screenshot 2024-07-05 at 10 59 20 AM

Value error from following docs

Screenshot 2024-07-05 at 11 00 34 AM Screenshot 2024-07-05 at 11 00 45 AM

Currently available leagues

FBref leagues

Fix

I think a simple updates to the docs is what's needed here unless the available leagues should include the leagues that are currently not available. I'm new to the repo but thought I'd file the issue as I go through. Happy to put up a PR updating the docs.

Hey,

This seems to work fine on my end.

>>> import soccerdata as sd
>>> print(sd.__version__)
1.8.1

>>> sd.FBref.available_leagues()

['Big 5 European Leagues Combined',
 'ENG-Premier League',
 'ESP-La Liga',
 'FRA-Ligue 1',
 'GER-Bundesliga',
 'INT-European Championship',
 "INT-Women's World Cup",
 'INT-World Cup',
 'ITA-Serie A']

Did you perhaps edit the league_dict.json config file?

Hey @probberechts thanks for the prompt reply.

I didn't edit any config files. Running off a fresh install. Looks like I'm on the same version you are.

Screenshot 2024-07-05 at 2 02 39 PM

I'm closing this since there is absolutely no way in which I can reproduce it. All tests are passing. But let me know if you would be able to figure out what's causing the issue.