Skip to content

andreihar/footy-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Footy AI

Contributors Licence LinkedIn

An end-to-end application for predicting UEFA Euro tournaments

A comprehensive platform to visualise and interact with AI match predictions. This React-based application features detailed pages of statistics, historical data, language localisations, and more.

➤ Live Demo


Table of Contents
  1. About The Project
  2. Install
  3. Features
  4. Lighthouse Report
  5. Contributors
  6. Licence

About The Project

Footy AI is a unique end-to-end platform developed in anticipation of the UEFA Euro 2024 tournament.

The application aims to enrich the engagement of football enthusiasts by using artificial intelligence to predict match outcomes and provide insightful statistics based on match and ELO data. In addition to focusing on Euro 2024, the platform offers a retrospective view of past tournaments, allowing users to explore historical odds and performances of their national teams.

Footy AI provides detailed match predictions, comprehensive tournament statistics, and custom match-ups between UEFA national teams. It features interactive visualisations and insights into AI prediction accuracy, offering users a deep dive into football data. The website utilises routing-based localisation and tournament data retrieval, allowing it to be precompiled on the server, which results in optimised loading times and improved SEO for a fast and seamless user experience.

Built With

  • NextJS
  • MUI
  • Next-Intl
  • sklearn

Install

Run the app locally:

$ cd client
$ npm install
$ cp .env.example .env

Fill in the required values for title, url, and tournaments range.

$ npm run dev

The website can be accessed through the URL http://localhost:3000/.

Open the notebook using your choice software in a terminal or command window. For example, if the software is Jupyter Notebook:

jupyter notebook server/euro.ipynb

Features

Overview Page

The Overview Page serves as the central hub, providing a summary of the AI's prediction performance for a certain tournament. Users can see recent predictions and their outcomes, as well as visual representations of the AI's overall and daily prediction accuracy.

Overview

All Matches

The All Matches page offers a comprehensive view of all tournament matches with detailed predictions and actual results. It features search parameter-based pagination for seamless navigation between matches while preserving server-side rendering for optimal performance and faster page loading.

Matches

Group Stage

The Group Stage Page presents the predicted results for each team within the groups. It includes statistics on the accuracy of the AI's predictions for rankings, match outcomes, and exact scores.

Groups

Knockout Stage

The Knockout Stage Page features a bracket view, showing the predicted scores and actual outcomes for each match for the knockout rounds.

Knockout

Custom Match

The Custom Match Page allows users to create custom match-ups between any two UEFA countries from any historical period of the Euro tournaments. Users can see the AI's predictions for these hypothetical matches, and define whether they want the draw option to be available, providing a fun and interactive way to explore potential outcomes of dream match-ups.

Custom

Localisation

Users can switch between all main languages of UEFA by selecting the desired option from the language selector drop-down menu in the Navbar.

French German

Prediction Model

Footy AI uses a robust prediction model using Linear Regression to predict goal differences based on ELO differences. Linear Regression is chosen for its simplicity and effectiveness in modelling the relationship between ELO ratings and goal differences. The model is trained on the International football results dataset, and incorporates ELO Ratings from 1901 to 2024. Expected Goals (xG) are used to normalise goal scoring based on team performance, serving as the main prediction attribute. ELO Ratings quantify team strength, allowing the model to account for the relative strengths of the teams, leading to more accurate predictions. To reflect the random nature of goal scoring, Poisson Distribution is used to simulate match scores. The model uses data from all international matches over the past four years from the starting date of the tournament, so as to consider semi-major player changes. The prediction percentages are determined after simulating 10,000 matches.

Lighthouse Report

Audit

Contributors

Licence

Because Footy AI is MIT-licensed, any developer can essentially do whatever they want with it as long as they include the original copyright and licence notice in any copies of the source code.

Releases

No releases published

Packages

No packages published