Thanks to visit codestin.com
Credit goes to github.com

Skip to content

⚽ High-performance football analytics toolkit: build data pipelines, scrape data, model matches, rank teams, and bet smarter | Powered by pena.lt/y/blog πŸš€

License

Notifications You must be signed in to change notification settings

martineastwood/penaltyblog

Repository files navigation

Penalty Blog

Penalty Blog Logo

penaltyblog: Football Data & Modelling Made Easy

penaltyblog is a production-ready Python package designed for football (soccer) analytics, providing powerful tools from 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.

Features

  • πŸ”„ Streamline JSON Workflows with MatchFlow: Process nested football data using a lazy, streaming pipeline built for JSON. Filter, select, flatten, join, group, and summarize large datasets without loading everything into memory.
  • πŸ“Š Model Matches Efficiently: High-performance implementations of Poisson, Bivariate Poisson, Dixon-Coles, and other advanced statistical models, optimized with Cython for rapid analysis.
  • ⚽ Scrape Data: Collect match statistics from sources like FBRef, Understat, Club Elo, and Fantasy Premier League.
  • πŸ’° Bet Smarter: Precisely estimate probabilities for Asian handicaps, over/under totals, match outcomes, and more.
  • πŸ† Rank Teams: Evaluate team strengths with sophisticated methods including Elo, Massey, Colley, and Pi ratings.
  • πŸ“ˆ Decode Bookmaker Odds: Accurately extract implied probabilities by removing bookmaker margins (overrounds).
  • 🎯 Fantasy Football Optimisation: Mathematically optimize your fantasy football squad to maximize performance.
  • 🎨 Visualize with Style: Create publication-ready pitch visualizations and data flow diagrams with customizable themes, supporting multiple data providers and flexible layouts.

Take your football analytics and betting strategy to the next level with penaltyblog πŸš€

Installation

pip install penaltyblog

πŸš€ Quick Start - Try it Now!

Run these examples directly in your browser (no installation required):

Example Description Colab
Predict Soccer Match Results Build a match prediction model from scratch Open In Colab
Process Soccer Data the Easy Way Lazy processing of football data using Matchflow Open In Colab
Calculate Massey Ratings Calculate teams' attack and defense strengths Open In Colab
Use Pi Ratings Like Elo ratings, but better Open In Colab
Create Interactive Charts Create your own interactive football vizualisations Open In Colab
Work Directly With Statsbomb Data Connect directly to Statsbomb's API, including their free open data sets Open In Colab
Calculate Implied Probabilities Calculate implied probabilities from bookmaker's odds Open In Colab

Documentation

Learn more about how to utilize penaltyblog by exploring the official documentation and detailed examples:

Why Penaltyblog?

Unlike many football analytics resources that are academic, one-off, or hard to scale, penaltyblog is designed from the ground up to be production-ready, performance-optimized, and practically useful.

It combines advanced statistical models, efficient implementations (via Cython), and real-world workflows, from scraping public data to modelling outcomes and optimising fantasy teams.

Built by Martin Eastwood, who has worked with football clubs, governing bodies, player agencies and betting syndicates worldwide, penaltyblog is the foundation for football analytics.

Whether you're a club analyst, independent researcher, or just data-curious, penaltyblog gives you the tools to go from data to insight - fast, flexibly, and with confidence.

Support & Collaboration

If you're working at a football club, agency, or organisation and want help applying these tools to your own data or workflows, I'm open to:

  • πŸ“‚ Integration support
  • πŸ”§ Custom model development
  • 🧠 Technical collaboration on football analytics projects

➑️ Get in touch here