Skip to main content

A Football Manager data-based scouting tool.

Project description

Contributors Forks Stargazers Issues GNU License LinkedIn

Football Manager Scouting

A tool for facilitating data-driven scouting in Football Manager
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Football Manager Scouting 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.

(back to top)

Getting Started

  1. 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).
  2. Create an empty PostgreSQL database,
  3. 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

(back to top)

Usage

Import the tools.

from football_manager_scouting.spider import spider
from football_manager_scouting.index import index
from football_manager_scouting.insert_data import 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.
)

(back to top)

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

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

football_manager_scouting-0.1.17.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

football_manager_scouting-0.1.17-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file football_manager_scouting-0.1.17.tar.gz.

File metadata

File hashes

Hashes for football_manager_scouting-0.1.17.tar.gz
Algorithm Hash digest
SHA256 265e5a5bf8f3a8df14d0e548c65fd169ec101e8b8260b8e8a77b55f86b3211f3
MD5 a958b79b1d142106e9073136ca16a169
BLAKE2b-256 88c357c15c6013d5a50cd311ef8f79bb9bef07a287caada0bf8bf4fbef83a1cc

See more details on using hashes here.

File details

Details for the file football_manager_scouting-0.1.17-py3-none-any.whl.

File metadata

File hashes

Hashes for football_manager_scouting-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 6defdf320428dad7403fc1606115878ecc1eb61e2136bc0ad43ab913809bb175
MD5 7879a9f37bfc538183288b2386d8f4be
BLAKE2b-256 2664d6d0ec2483799f6cbee8580109be6b1f8355a55661eaec54b6240dfaf49a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page