Euro2024Predictor is a Python-based project that simulates the outcomes of UEFA Euro 2024 football matches. It includes functionalities for simulating group stage matches, computing standings, and predicting knockout stage results. The project also provides a Flask web application to display the simulated results.
- Group Stage Simulation: Simulates matches in the group stage based on historical data and win percentages.
- Knockout Stage Simulation: Predicts the outcomes of knockout stage matches.
- Standings Calculation: Computes the standings of teams based on match results.
- Data Transformation: Preprocesses historical match data for simulations.
- Web Interface: Displays the simulation results in an interactive web application.
Euro2024Predictor/
│
├── config/
│ └── config.yaml # Configuration file for teams and parameters
│
├── data/
│ ├── raw/ # Raw data files
│ └── results/ # Simulated results files
│
├── scripts/
│ ├── __init__.py
│ ├── cache.py # Cache handling functions
│ ├── calculations.py # Main calculations and data handling
│ ├── config.py # Configuration loading
│ ├── data_sort.py # Data sorting functions
│ ├── data_store.py # Data storing functions
│ ├── data_transform.py # Data transformation functions
│ ├── group_match_calculations.py # Group stage match simulations
│ ├── knockout_stage_calculations.py # Knockout stage match simulations
│ ├── standings_calculations.py # Standings calculations
│ ├── weighted_win_percentage.py # Win percentage calculations
│ └── win_percentages.py # Win percentages computations
│
├── static/
│ └── style.css # CSS for the web application
│
├── templates/
│ └── index.html # HTML template for the web application
│
├── tests/ # Test cases for the project
│ └── __init__.py
│
├── .gitignore # Git ignore file
├── README.md # Project documentation
├── requirements.txt # Python dependencies
├── main.py # Main script to run the predictor
├── procfile # Procfile for deploying to Heroku
└── webapp.py # Flask web application
- Python 3.7+
- pip (Python package installer)
- Clone the repository:
git clone https://github.com/yourusername/Euro2024Predictor.git
cd Euro2024Predictor
- Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\Activate`
- Install the dependencies:
pip install -r requirements.txt
You can run the predictor as a command-line tool or as a web application.
- Run the predictor:
python main.py
- Start the Flask web application:
python webapp.py
- Open your web browser and go to
http://127.0.0.1:5000
to view the results.
To run the tests, use the following command:
pytest
The config.yaml
file contains the configuration for the teams and other parameters used in the simulations. Update this file to change the teams or simulation settings.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m 'Add new feature'
) - Push to the branch (
git push origin feature-branch
) - Create a new Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.