This Python script provides a command-line interface (CLI) tool to analyze bonus data of Kicktipp users. It supports various modes of analysis such as prediction frequencies, group winner predictions, and prediction networks. Users can exclude specific players from the analysis if desired.
- Analyze the frequency of predictions in specific columns.
- View group winner predictions across different groups.
- Create a network graph to illustrate the relationships between teams predicted to reach the semi-finals together.
- Python 3.6+
- Pandas
- Matplotlib
- NetworkX
- Docopt
To use this tool, follow these steps:
- Clone the repository:
git clone https://github.com/TadeSF/kicktipp-bonus-analysis.git
- Navigate to the directory where the repository is cloned:
cd bonus_analysis
- Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate
- Ensure you have Python installed, and install the required packages:
pip install -r requirements.txt
To run the script, use the following command format:
python bonus_analysis.py FILE [MODE] [COLUMN] [--exclude=<players>]
FILE
: The path to the CSV file containing the bonus data.MODE
: Specify the analysis mode (prediction_freq
,groups
, orprediction_network
).COLUMN
: The column in the CSV file to analyze (applicable only inprediction_freq
mode).--exclude=<players>
: A comma-separated list of player names to exclude from the analysis.
In all cases, the script will output general information about the data and then display the results of the analysis.
- Analyzing prediction frequencies for a specific column:
python bonus_analysis.py data.csv prediction_freq WM --exclude=JohnDoe,JaneDoe
- Generating a network graph of team predictions:
python bonus_analysis.py data.csv prediction_network
- Viewing group winner predictions:
python bonus_analysis.py data.csv groups
Contributions are welcome! Please fork the repository and submit pull requests with your proposed changes.
You can find the license information in the LICENSE
file.
For more information, please refer to the documentation included with the script or contact the maintainers.