FPL Analytics Dashboard
Fantasy Premier League dashboard built on an actual probability model Dixon–Coles match simulation, negative-binomial player rates, and empirical-Bayes team strength, run as an on-demand Monte Carlo so every projection shows its distribution rather than a single number.
Skills involved
What This Is
An FPL dashboard that turns the public FPL API into transfer, captaincy and squad decisions grounded in an actual probability model. The official app and most third-party sites show a projection as a single number. This one runs the simulation and shows you the distribution behind it a FastAPI backend doing on-demand Monte Carlo, a Next.js frontend that displays the elapsed run time and whether the result was cached or fresh.
The framing that drives everything: the mean is almost never the statistic you need.
- Who do I captain? →
p_hauland ceiling, not the mean - Is this a safe hold? →
p_blankand floor - Do I take the −4? →
P(gain > 4) - Is my squad a coin-flip? → squad standard deviation, which needs correlation
Dixon–Coles, and Why It's Here
Two independent Poisson draws for goals-for and goals-against is the textbook football model, and it is measurably wrong in one specific place: it under-predicts low-scoring draws. Dixon & Coles (1997) fix this with a multiplicative correction on the four lowest scorelines, with a single league-wide dependence parameter ρ ≈ −0.065.
The temptation is to claim this re-prices every clean sheet. It does not, and the test suite proves it τ preserves the marginals, so P(clean sheet) goes 0.2592 → 0.2592 exactly. What changes is the joint distribution, and that is what gets consumed: a player's goals are drawn out of their team's goal total and the clean sheet comes from the same scoreline, so τ decides how often "we kept a clean sheet and scored" co-occurs. That correlation is what drives defender returns and squad variance.
A head-to-head of six goal models on Ranked Probability Score put Dixon–Coles first but every model was inside 0.0002 RPS of every other. The honest lesson isn't "Dixon–Coles wins", it's "the choice of count distribution barely matters; what you condition on does" which is why most of the work went into conditioning.
Team Strength: The Pre-Season Zero Bug
In-season, the two rates per fixture come from FPL's strength_attack_* / strength_defence_* fields. In pre-season all four are 0 for all twenty clubs. Dividing a column of zeros by a zero mean gave every club exactly 1.0 Manchester City at home to a promoted side was modelled bit-identically to a bottom club away at Arsenal, and the fixture-difficulty fallback was unreachable dead code.
The replacement blends three sources into a log multiplier centred on the league:
goals(weight 0.50) last season's measured goals for and against, per match playedstrength(weight 0.30) last season's archived attack/defence strength ratingstier(weight 0.20) the livestrength_overall_*fields, integers 2–5
Measurement gets the largest weight because it's the only actual observation; tier is coarsest but is the only source that covers a newly promoted club. Empirical-Bayes shrinkage with a floor keeps a freak low-variance season from collapsing everyone back to 1.0, and an unrateable club is omitted from the rates dict rather than defaulted which is what finally makes the FDR fallback reachable.
Two details that matter more than they look:
- The join is on
code, neverid. FPL reassignsidalphabetically every August;codeis stable for the life of the club. - Goals conceded is summed over a club's goalkeepers only, because exactly one keeper is on the pitch at a time. Including outfielders multiplies it elevenfold.
Promoted Clubs Get a Measured Prior
FPL's tier rating is far too kind to promoted sides on tier alone they came out attacking at 0.81× and conceding at 1.19× league average. Measured against eleven seasons of actual results (all 30 clubs promoted between 2016-17 and 2025-26):
- goals for ÷ league average: 0.704 (sd 0.170)
- goals against ÷ league average: 1.238 (sd 0.247)
So a promoted club takes its level from that prior and its home/away shape from the tier, which is the only venue signal available to a club with no history.
The Season-Rollover Constraint
The single constraint that shapes the whole data layer: every performance metric reads a player's explicit baseline (last completed season) rather than the live bootstrap-static row. The FPL API rolls over to a new season with last season's totals still sitting in every row, weeks before a ball is kicked. Reading the live row there produces a quietly wrong number, which is worse than a labelled gap.
The corollary is a promise the product deliberately does not make: gameweek-level history does not survive a rollover, so past seasons are totals only twenty seasons deep, and there are no per-gameweek historical charts.
The Assistant Is the Secondary Feature
A Gemini assistant answers questions about the squad, but only from tool calls against the same data layer never from model memory. It's deliberately the smaller half of the product: the probability model is the differentiator, and an LLM that could hallucinate a projection would undo the point of having one.
What's Next
- Live end-to-end validation of the assistant tool layer against a real key
- Transfer planning over a multi-gameweek horizon, using
P(gain > 4)rather than expected points - Correlation-aware squad optimisation: eleven players reading a handful of matches is a much smaller effective sample than it looks
Last updated Jul 30, 2026
← Back to all projects