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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for football_manager_scouting-0.1.14.tar.gz
Algorithm Hash digest
SHA256 6b93d0daef08aaeb864aca9d07ad99a453082385555326c6f84af031801cd617
MD5 b60a1770c222fb2f518aef5ceac8d76c
BLAKE2b-256 773685e60bd08a9093b20ef210a8cc2e29bf28ad71fb46f8ec645d0d9dc7fb4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for football_manager_scouting-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 577678c7a415599c7401bd102fa852c0083e438c4adc3819990f40dfc466200e
MD5 3463ac63474c084d2cdcaf8416139920
BLAKE2b-256 54e0ecc710bff7ff9d470fd2f40dd7e0d987236293f772ddb7f553fc70700b17

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