NSL Player Radar KNN
Find the most similar player in the Nepal Super League (NSL).
What is NSL Player Radar?
NSL Player Radar is a football analytics tool I built for the Nepal Super League (NSL) .
The idea was simple. What if you could pick any NSL player and instantly find who plays most like them? Whether you're a fan curious about player comparisons or a team looking for a replacement after losing a key player, this tool answers that in seconds.
How the Similarity Engine Works
At the heart of it is a KNN (K-Nearest Neighbors) machine learning model that compares players across 9 performance stats; goals, shots, dribbles, chances created, defensive actions, aerials won, and more.
It normalizes all the data so a player with 50 defensive actions isn't unfairly weighted against one with 5 goals, then finds the most statistically similar players using Euclidean distance. The result is a similarity percentage that actually makes sense. The closest match might be 85% similar while the fourth might be around 65%.
Features
The app has two modes. Find Similar lets you pick a player and see 4 KNN-recommended similar players with a radar chart overlay for visual comparison. Head to Head lets you manually pick any two players and stack their stats side by side. Every player also gets a stat card showing their raw numbers alongside percentile bars so you can immediately tell if someone's shots are top 25% in the league or bottom half.
Tech Stack
I built this solo as my 3rd year college project using React and Tailwind CSS on the frontend, with a Python FastAPI backend, SQLite database, and scikit-learn for the ML model. The player data covers all 7 NSL teams and is seeded from random generated data sets. It's not deployed yet but the full source code is on GitHub.
What I Learned
What I enjoyed most was building the similarity engine; figuring out which stats to include, how to normalize them properly so the comparisons are fair, and tuning the similarity score formula until the results felt right. It's one thing to build a CRUD app, it's another to make a machine learning model produce results that a football fan would look at and say "yeah, that makes sense."