{ "cells": [ { "cell_type": "markdown", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "
\n", " \"Penalty\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# penaltyblog: Football Data & Modelling Made Easy\n", "\n", "**penaltyblog** is a production-ready Python package designed for football (soccer) analytics, providing powerful tools from [pena.lt/y/blog](https://pena.lt/y/blog) for data analysis, outcome modelling, and betting insights. Optimized with Cython, **penaltyblog** delivers high-performance modelling to power faster, efficient predictions.\n", "\n", "## Features\n", "\n", "- 🔄 **Streamline JSON Workflows with MatchFlow** – Process deeply nested football event data using a lazy, streaming pipeline built for JSON. Filter, select, flatten, join, group, and summarize large datasets - all without loading everything into memory.\n", "- ⚽ **Scrape Data** – Collect match statistics from sources like FBRef, Understat, Club Elo, and Fantasy Premier League.\n", "- 📊 **Model Matches Efficiently** – High-performance implementations of Poisson, Bivariate Poisson, Dixon-Coles, and other advanced statistical models, optimized with Cython for rapid analysis.\n", "- 💰 **Bet Smarter** – Precisely estimate probabilities for Asian handicaps, over/under totals, match outcomes, and more.\n", "- 🏆 **Rank Teams** – Evaluate team strengths with sophisticated methods including Elo, Massey, Colley, and Pi ratings.\n", "- 📈 **Decode Bookmaker Odds** – Accurately extract implied probabilities by removing bookmaker margins (overrounds).\n", "- 🎯 **Fantasy Football Optimisation** – Mathematically optimize your fantasy football squad to maximize performance.\n", "\n", "Take your football analytics and betting strategy to the next level with **penaltyblog** 🚀\n", "\n", "## Installation\n", "\n", "```bash\n", "pip install penaltyblog\n", "```\n", "\n", "## Quick Start - Try it Now!\n", "\n", "Run these examples directly in your browser (no installation required):\n", "\n", "| Example | Description | Colab |\n", "|---------|-------------|-------|\n", "| **Predict Soccer Match Results** | Build a match prediction model from scratch | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1GjrDG_iq_9_lxEQK_aBmr-jCCCnFt0v7?usp=sharing) |\n", "| **Process Soccer Data the Easy Way** | Lazy processing of football data using Matchflow | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1rRJV8mNOTLTXmn5cOGT4faxIwIP44pC-?usp=sharing) |\n", "| **Calculate Massey Ratings** | Calculate teams' attack and defense strengths | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1d_WPJwQgrogeSI9oIO9fY8s18CPPZ8nL?usp=sharing) |\n", "| **Use Pi Ratings** | Like Elo ratings, but better | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/12qEDCNYG-FFHOJ_kURe0cm80sScandyh?usp=sharing) |\n", "| **Create Interactive Charts** | Create your own interactive football vizualisations | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1xFfIdvmbFcjHlS_2eHEu3NxD-xLNrbpY?usp=sharing) |\n", "| **Work Directly With Statsbomb Data** | Connect directly to Statsbomb's API, including their free open data sets | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1xFfIdvmbFcjHlS_2eHEu3NxD-xLNrbpY?usp=sharing) |\n", "\n", "\n" ] }, { "cell_type": "raw", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [], "vscode": { "languageId": "raw" } }, "source": [ ".. toctree::\n", " :maxdepth: 1\n", " :caption: Table of Contents\n", "\n", " backtest/index\n", " betting/index \n", " fpl/index\n", " implied/index\n", " install/index\n", " matchflow/index \n", " matchflow_recipes/index\n", " metrics/index \n", " models/index\n", " ratings/index \n", " scrapers/index\n", " viz/index\n", "\n", ".. toctree::\n", " :maxdepth: 1\n", " :caption: Resources & References\n", "\n", " api/index\n", " changelog/index \n", " roadmap/index\n", " references/index" ] } ], "metadata": { "kernelspec": { "display_name": "venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.1" } }, "nbformat": 4, "nbformat_minor": 4 }