Skip to main content

Library from http://pena.lt/y/blog for scraping and modelling football (soccer) data

Project description

Penalty Blog

Python Version Coverage Status PyPI Downloads License: MIT Code style: black Code style: pre-commit

The penaltyblog Python package contains lots of useful code from pena.lt/y/blog for working with football (soccer) data.

penaltyblog includes functions for:

  • Scraping football data from sources such as football-data.co.uk, FBRef, ESPN, Club Elo, Understat, SoFifa and Fantasy Premier League
  • Modelling of football matches using Poisson-based models, such as Dixon and Coles, and Bayesian models
  • Predicting probabilities for many betting markets, e.g. Asian handicaps, over/under, total goals etc
  • Modelling football team's abilities using Massey ratings and Colley ratings
  • Estimating the implied odds from bookmaker's odds by removing the overround using multiple different methods
  • Mathematically optimising your fantasy football team

Installation

pip install penaltyblog

Documentation

To learn how to use penaltyblog, you can read the documentation and look at the examples for:

References

  • Mark J. Dixon and Stuart G. Coles (1997) Modelling Association Football Scores and Inefficiencies in the Football Betting Market
  • Håvard Rue and Øyvind Salvesen (1999) Prediction and Retrospective Analysis of Soccer Matches in a League
  • Anthony C. Constantinou and Norman E. Fenton (2012) Solving the problem of inadequate scoring rules for assessing probabilistic football forecast models
  • Hyun Song Shin (1992) Prices of State Contingent Claims with Insider Traders, and the Favourite-Longshot Bias
  • Hyun Song Shin (1993) Measuring the Incidence of Insider Trading in a Market for State-Contingent Claims
  • Joseph Buchdahl (2015) The Wisdom of the Crowd
  • Gianluca Baio and Marta A. Blangiardo (2010) Bayesian Hierarchical Model for the Prediction of Football Results

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

penaltyblog-0.7.0.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

penaltyblog-0.7.0-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

Details for the file penaltyblog-0.7.0.tar.gz.

File metadata

  • Download URL: penaltyblog-0.7.0.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.8 Darwin/22.3.0

File hashes

Hashes for penaltyblog-0.7.0.tar.gz
Algorithm Hash digest
SHA256 4c0b0f8e28aa32e8e95a03f51b7a2dae04a31f1f721af094c75daeb4874dd7ca
MD5 e5558b7596e1cc8d991a52253d8dd44d
BLAKE2b-256 77729b07332dcc2e9a196ad1c470c6ccb0895c6e1d6685a449ab48a12544aced

See more details on using hashes here.

File details

Details for the file penaltyblog-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: penaltyblog-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.8 Darwin/22.3.0

File hashes

Hashes for penaltyblog-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7341b10be438fd349b06144e93e2d340271a1ab691e7f36a10439baa0f4e05ef
MD5 e332fc4743b48bcd7c053d03bc325fcd
BLAKE2b-256 8c85a4ba1a530a06f21d24ec230bcf6a1752e479d4f5243c0d58e60c0619b9fa

See more details on using hashes here.

Supported by

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