A Football Manager data-based scouting tool.
Project description
Football Manager Scouting
A tool for facilitating data-driven scouting in Football Manager
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
About The Project
Football Manager Scouting (bad name I know) is a python program for making data driven scouting easier in the FM games.
It currently provides two scouting tools:
· Spider
: Creates a radar chart (or, "spider") comparing the statistics of a player from your session with either the statistics of another player or with the average stats of a group of players.
· Index
: Creates a csv file displaying categorical information of the player (contract info, club, division, attributes etc.) and most importantly, a score for each statistical category as well as an overall index, showing how good the players has performed compared to the other players in dataset.
The program works by taking the raw rtf-file printed from the game, processing each value for each player, and saving them to an SQL database. When either of the two tools, Spider or Index, are used, the program retrieves the relevant data from the database and generates the desired radar chart or csv-file. The insert_data
module is therefore the entire programs entry point as it saves the player data to the database.
Football Manager Scouting also makes it possible to compare players/clubs/divisoin over several seasons by adding players to the database after every in-game season. Football Manager otherwise deletes a lot of data after a new season has started, making it difficult to, for instance, compare changes in age structure of your squad over the seasons.
Getting Started
- The first step is to download the data from Football Manager: 1a) In the scouting of the game, use the provided view from moneyball.fmf, 1b) Select all players, print, and save as text file (to rtf format).
- Create an empty PostgreSQL database,
- Install package:
pip install football-manager-scouting
.
See Usage for examples of how to insert data and use Spider and Index.
Prerequisites
- PostgreSQL,
- Python >= 3.8,
- SQLAlchemy >= 2.0
- psycopg2-binary >= 2.0
- tqdm >= 4.0
- Soccerplots = 1.0
Installation
pip install football-manager-scouting
Usage
Import the tools.
from football_manager_scouting import spider, index, insert_data
Create a dictionary with the login information to the PostgreSQL database.
db_login = {
'user': 'username',
'password': 'password',
'host': 'localhost:5432',
'database': 'database'
}
Insert the downloaded data to the database.
insert_to_database(
db_login=db_login,
path='./data.rtf', # The path to the downloaded file with the player data.
season=24, # The current in-game season.
total=50435, # The total number of players in the data file. For the progress bar. OPTIONAL.
n=50000 # After how many players should entries be commited to the database. For datafile with a large number (>100000) of players it is recommended to do several smaller commits.
)
Create a radar chart of a player comparing him to the other players of that position in the same division. The chart will be saved to ./spider.jpg
spider(
db_login=db_login,
name='John Doe', # The name of the player.
comparison='average', # If the comparison should be to another player or to the average of multiple players.
category='DC', # Filter which statistical categories that should be used in chart.
position='DC', # The position of the players.
mins=500, # The minimum number of minutes a player should have played to be included.
division='Premier League' # The division of the players.
)
Create an index csv file. The file will be saved to a csv file named after the category in the working directory.
index(
db_login=db_login,
category='STC', # Filter which statistical categories that should be used in the index.
position='STC, AMC', # The position of the players.
mins=500, # The minimum number of minutes a player should have played to be included.
division=None # The division of the included players. None means that it will not filter on division.
)
License
Distributed under the GNU License. See LICENSE
for more information.
Contact
Hannes Lindbäck - hanneskarllindback@gmail.com
Project Link: https://github.com/HannesLindback/Football-Manager-scouting
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file football_manager_scouting-0.1.0.tar.gz
.
File metadata
- Download URL: football_manager_scouting-0.1.0.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2790eb7468bb0cb5204aa1ea43974f95b2b804ac0d24212be249b5053286ed96 |
|
MD5 | 14694469fc3366a5163fc495e3a31bb7 |
|
BLAKE2b-256 | ed17beb3c5fbbf446b797a5253ab6543418a7957e95de68b74fe702429e7dbe7 |
File details
Details for the file football_manager_scouting-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: football_manager_scouting-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5bbdb3453446c0b51b425c22311d2f65702afd689bcd2819a1976f010ae5585 |
|
MD5 | 0ea067d18bf14469fd8ca39184639ef4 |
|
BLAKE2b-256 | 61ed37ea9fbe0b7dc6beca841da0de2379b3ea6997746bbc595bba055f1cd340 |