Ever wondered which players have lined up for both Real Madrid and PSG or Chelsea and AC Milan? I built a Python-powered interactive web app that challenges football fans to name players who've played for two different clubs across Europe's top five leagues: Premier League, La Liga, Serie A, Bundesliga and Ligue 1.

Whether you're a casual fan or a seasoned football historian, this European football quiz game offers a deep dive into football history, to uncover fascinating transfer stories and trends.

Ready to challenge yourself? Head over to juliananalytics.com/players-in-common and see how many player connections you can uncover!

Game Concept

Players in Common is a web-based quiz challenge where users:

  1. Select or randomise two clubs from any of the top five European leagues
  2. Guess players who've played for both clubs at any point over the last 30+ years
  3. Receive instant feedback on their guesses

It's like a mix between football trivia and memory challenge — backed by real data.

Data Collection from FBref.com

To power this quiz, I needed a rich and accurate dataset of historical player movements across leagues. I built a custom web scraper which pulls data from FBref.com, a comprehensive football stats website.

The scraper:

  • Uses Selenium to navigate dynamically loaded pages
  • Parses player lists with BeautifulSoup
  • Traverses season-by-season rosters from 1992 to present
  • Normalizes and stores data in CSV format, ready for fast lookups

This approach gave me a unified dataset of players and the clubs they played for, across decades and countries.

Data scraped from FBref.com
Historical data from the top 5 European leagues were scraped from FBref.com

Frontend

To make the game playable in any browser, I used Streamlit, a Python-based framework for quickly building data apps. Features include:

  • Dropdown menus for selecting two clubs from any league
  • "Randomise Teams" button for the app to pick the teams itself
  • Text input field to type player guesses
  • Real-time feedback (green for correct, red for incorrect)
  • Progress metrics (correct/incorrect guesses, remaining players)
  • "Reveal Answers" button for those tough matches

The layout is clean, mobile-responsive, and quick to deploy — all without needing complex JavaScript or frontend frameworks.

Game Logic

Behind the scenes, the app uses:

  • Pandas for fast data filtering
  • Set operations to find common players between teams
  • Rapidfuzz to help recognise misspellings
  • Unicodedata normalization for consistent string matching

You can explore the code at github.com/JulianB22/Football/Apps