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.16.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

football_manager_scouting-0.1.16-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for football_manager_scouting-0.1.16.tar.gz
Algorithm Hash digest
SHA256 62234715a4fda3a0d19da0f1def2d0e530e15e5f4a66ba9e70de9f2ba97a7ad2
MD5 f1965c875bcdfc0a08e7a733a2bc4894
BLAKE2b-256 b30cc0e81efab234e234e075cfda2d99bd15e58a0027b55cb5fa63d390278943

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for football_manager_scouting-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 e42c4902fe3c9b3db2aa87da92da0c36b84ca821177941ef7a082b52461b5197
MD5 38286992fa887180decf67d110b92c9e
BLAKE2b-256 ac2213dc90aa15d72030bca667134867760aee0bd3a1c8f4f696b9007235d401

See more details on using hashes here.

Supported by

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