How I Built fplanaly.st: A Data-Driven FPL Analytics Tool

I have been playing FPL for years now, and like most managers, I spent way too much time refreshing Twitter for transfer tips and scrolling through spreadsheets trying to find the next hidden gem. At some point I thought: I am a data engineer, why am I not building something to help with this?

So I built fplanaly.st. It is a free FPL analytics tool that I use every week myself, and I wanted to share what it does and how it works under the hood.

The Features

Here is everything the tool offers:

xPoints Predictions

This is the main feature I built the tool around. xPoints predicts how many FPL points each player will score in the upcoming gameweek using a machine learning model.

When you enter your team ID, it calculates the total xPoints for your current squad. You can see which of your players are predicted to score well and which might be worth benching. There is also a captain suggestion based on who has the highest xPoints.

You can browse all players sorted by xPoints with position and price filters. Looking for a midfielder under 7m with good xPoints this week? Takes about two seconds to find them. You can also export the data to CSV if you want to do your own analysis.

The model handles double gameweeks and blank gameweeks automatically. DGW players get their xPoints multiplied by their fixture count, and BGW players show zero.

Differentials Finder

If you want to climb the rankings, you need players that your rivals do not own. The Differentials page finds low-ownership players with good underlying stats and favourable fixtures.

Each player gets a Differential Score calculated from: recent form, xGI per 90 minutes (expected goal involvement rate), upcoming fixture difficulty over the next few weeks, set piece involvement (penalties, corners, free kicks), and transfer momentum (whether they are rising or falling in ownership).

Players are split into two tiers: ULTRA differentials under 5% ownership (the real punts) and regular differentials between 5-15% ownership (still under the radar but less risky).

Fixture Planner

Planning transfers a few weeks ahead is crucial in FPL. The Fixture Planner shows the next 5 gameweeks for every team with colour-coded Fixture Difficulty Ratings (FDR). Green means easy (1-2), grey means medium (3), red means tough (4-5).

You can sort teams by their average FDR over the 5-week period to quickly find which teams have a good run coming up. Super useful around blank and double gameweeks when you need to plan multiple moves ahead.

Player Hub

A comprehensive player database where you can search any player and see their detailed stats. The page has three main views:

  • Form Players: Players ranked by their recent points performance. Shows who is hot right now.
  • Value Picks: Players ranked by points per million. Helps you find budget enablers who are outperforming their price tag.
  • Player Search: Search the entire database by name with filters for position, team, and price range.

Team Analysis

Enter your team ID to unlock personalised analysis of your FPL season. This section has four tabs:

  • Team Info: Your overall rank, total points, team value, and all your mini-league standings in one place.
  • Performance Charts: Visual graphs showing your gameweek-by-gameweek points, rank progression over the season, and how you compare to the overall average.
  • Transfer History: A complete log of every transfer you have made this season with the points each player scored after you brought them in or shipped them out. Useful for seeing which moves worked.
  • Gameweek Picks: Your starting XI and bench for any gameweek with the points each player scored.

Season Report Card

A visual summary of your FPL season designed to be shareable. Shows your rank, points, team value, and assigns grades for different aspects of your game: captaincy, transfers, bench management, and consistency. You can screenshot it and post it to Twitter or send it to your mini-league rivals.

How the xPoints Model Works

The xPoints prediction uses XGBoost, which is a gradient boosting machine learning algorithm. It is trained on historical FPL data to learn the relationship between player stats and the points they score.

The model uses these features to make predictions:

  • Rolling statistics over 3, 5, and 8 gameweek windows for goals, assists, clean sheets, xG, xA, and minutes played. Using multiple windows captures both short-term form and longer-term consistency.
  • Player position (goalkeeper, defender, midfielder, forward) since the FPL scoring system rewards positions differently.
  • Fixture difficulty rating for the upcoming match.
  • Home or away indicator since players tend to perform differently at home.
  • Ownership percentage from the FPL API.
  • Player availability status and chance of playing next round.
  • Current form rating from the FPL API.

The model is trained using a time-based split, meaning it trains on earlier gameweeks and tests on more recent ones. This simulates real-world usage where you are always predicting future games based on past data. Hyperparameters are tuned using grid search with time series cross-validation.

For double gameweeks, the model predicts points per fixture and then multiplies by the number of fixtures. Players with no fixture (blank gameweek) or 0% chance of playing automatically get zero xPoints.

The Data Pipeline

Since I work with data pipelines professionally, I wanted to build this properly. The analytics layer runs on a dbt pipeline that refreshes daily at 6am UTC.

The pipeline has four stages:

  1. Data ingestion: A Python script pulls data from the official FPL API. Between gameweeks it only fetches price and ownership changes (takes a couple of seconds). During gameweeks it does a full refresh with all match data.
  2. Staging models: 7 dbt models clean and normalise the raw data covering players, teams, positions, events, player history, and fixtures.
  3. Mart models: 12+ analytical models transform the data into features like value picks, differentials, fixture difficulty, transfer trends, expected stats, and set piece takers.
  4. Snapshots: dbt snapshots track price and ownership changes over time for historical analysis.

A FastAPI backend exposes REST endpoints that the Next.js frontend consumes. Endpoints include /value-picks, /transfer-trends, /players, /expected-stats, and more.

Tech Stack

  • Frontend: Next.js 14 with React, Tailwind CSS, Framer Motion for animations, Recharts for graphs
  • Backend: FastAPI (Python) serving the analytics endpoints
  • Data Pipeline: dbt with DuckDB for transformations
  • ML: XGBoost via scikit-learn
  • Hosting: Vercel for the frontend, Railway for the API and pipeline

Give it a try

Head to fplanaly.st and enter your FPL Team ID to get started. To find your Team ID, log into the official FPL site, click Pick Team, then Gameweek History. The number in the URL after /entry/ is your Team ID.

Everything is free and the code is open source on GitHub. If you have feedback or feature ideas, hit me up on Twitter.


Click here to share this article with your friends on X if you liked it.