• Stars
    star
    296
  • Rank 140,464 (Top 3 %)
  • Language
    Python
  • License
    Other
  • Created almost 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

SoccerData

PyPI Python Version License Read the documentation at https://soccerdata.readthedocs.io/ Tests Codecov pre-commit Black

SoccerData is a collection of wrappers over soccer data from Club Elo, ESPN, FBref, FiveThirtyEight, Football-Data.co.uk, SoFIFA and WhoScored. You get Pandas DataFrames with sensible, matching column names and identifiers across datasets. Data is downloaded when needed and cached locally.

import soccerdata as sd

# Create scraper class instance for the Premier League
five38 = sd.FiveThirtyEight('ENG-Premier League', '1819')

# Fetch dataframes
games = five38.read_games()

To learn how to install, configure and use SoccerData, see the Quickstart guide. For documentation on each of the supported data sources, see the example notebooks and API reference.

Disclaimer: As soccerdata relies on web scraping, any changes to the scraped websites will break the package. Hence, do not expect that all code will work all the time. If you spot any bugs, then please fork it and start a pull request.