Squadoptimizer is an integrated Daily Fantasy Football tool that uses a variety of data sources and a custom algorithm to help users pick winning squads. Being ardent English football fans ourselves, we were really happy when they came to us with this idea. This project allowed us to use our full range of skills as we developed both the backend data processing system as well as the frontend web app.
Daily Fantasy leagues are big business in the U.S. and our client wanted to bring the same solutions to European football starting with the English Premier League. They had an initial version of the algorithm for player and team performance projections in an Excel sheet and a list of data scattered over several websites that was needed for it to work. They also needed a website that connected to the backend and allowed their users to view the projections and select their pool of players, from which the tool would generate the optimal 11 players.
Our team spent the first few days of the project doing interviews with the client and gathering all the information from them that we deemed necessary. We also conducted some research into the viability of the algorithms, checked the different data sources and also looked into similar websites for American sports. We then came up with a tentative plan and timeline that we shared with the client.
We started the coding phase by scoping out the frontend design and all the fields we would need for the best user experience. At the same time the backend team started created web scrapers and API scripts to start pulling in the data into a raw relational database. After we had some data to work with we started developing the algorithms to calculate the various parameters that went into the player and team projections. These metrices were then stored in a star schema database which are the standard for analytical data processing use-cases. It all came together after we connected this backend database to our frontend to create the initial version of the tool.
After getting some positive feedback from the client we set about automating the whole data processing pipeline. We also created the linear optimizer that calculated the best playing eleven based on the calculated parameters, user's choice of team formation, max player allowed from each team and their selected squad. This was coded on the frontend itself to avoid having to connect to the database everytime. Finally, after automating the whole tool and testing out the algorithms we deployed the whole app into the client's cloud server using our devops scripts.
Backend Data Processing
- Web ScrapingBeautifulsoup, Requests
- AutomationCelery, Redis
- Relational DatabasePostgreSQL 9
- AlgorithmsPython (Numpy, Scipy)
Frontend Web App
- Web ServerRuby Sinatra
- Linear OptimizerrGLPK
The site was tested towards the end of the 2016/17 premier league season and our models gave consistently good projections. The project was deemed successful by the client and they plan to launch it officially in the upcoming season. They were really happy with our work and we have since gone on to do other projects with them.