Skip to main content

A collection of wrappers over football (soccer) data from various websites / APIs. You get: Pandas dataframes with sensible, matching column names and identifiers across datasets. Data is downloaded when needed and cached locally. Example Jupyter Notebooks are in the Github repo.

Project description

Latest PyPI version Latest Travis CI build status

A collection of wrappers over football [*] data from various websites / APIs. You get: Pandas dataframes with sensible, matching column names and identifiers across datasets. Data is downloaded when needed and cached locally. Example Jupyter Notebooks are in the Github repo.

Data sources:

fivethirtyeight.com

(https://projects.fivethirtyeight.com/soccer-predictions)

Season 2016-17 predictions and results for the top European and American leagues.

football-data.co.uk

(http://www.football-data.co.uk/)

Historical results, betting odds and match statistics for English, Scottish, German, Italian, Spanish, French, Dutch, Belgian, Portuguese, Turkish and Greek leagues, including a number of lower divisions. Level of detail depends on league.

clubelo.com

(http://clubelo.com)

First team relative strengths, for all (?) European leagues. Recalculated after every round, includes history.

Roadmap:

Add player stats, transfers, injuries and suspensions.

Installation

$ pip install footballdata

Dependencies

Usage

import footballdata as foo

# Create class instances
five38 = foo.FiveThirtyEight()
elo = foo.ClubElo()
mhist = foo.MatchHistory('ENG-Premier League', '2016-17')

# Create dataframes
matches = five38.read_games()
forecasts = five38.forecasts()
current_elo = elo.read_by_date()
team_elo_history = elo.read_team_history('Barcelona')
epl_2016 = mhist.read_games()

See the Jupyter Notebooks here for more elaborate examples: https://github.com/skagr/footballdata/tree/master/notebooks

Compatibility

Tested against Python 2.7 and 3.4-3.6

Licence

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

footballdata-0.3.1.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file footballdata-0.3.1.tar.gz.

File metadata

File hashes

Hashes for footballdata-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c3b9c225383c8f1239e5e953becf2556e2d508cff6e599cc9894886f2516f8e8
MD5 9a84a9fd2d4e26a51cd90b808ff20efe
BLAKE2b-256 9393fc309a2d61d7ac81a51549270ad1085f688f1dfa4c0dad55bb6cef88110e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page