football-manager-scouting


Namefootball-manager-scouting JSON
Version 0.1.16 PyPI version JSON
download
home_pageNone
SummaryA Football Manager data-based scouting tool.
upload_time2024-11-22 10:56:37
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
license Football Manager scouting: A tool for facilitating player scouting in the video game Football Manager. Copyright (C) 2024 Hannes Lindbäck This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
keywords football manager fm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 -->
<a id="readme-top"></a>
<!--
*** Thanks for checking out the Best-README-Template. If you have a suggestion
*** that would make this better, please fork the repo and create a pull request
*** or simply open an issue with the tag "enhancement".
*** Don't forget to give the project a star!
*** Thanks again! Now go create something AMAZING! :D
-->



<!-- PROJECT SHIELDS -->
<!--
*** I'm using markdown "reference style" links for readability.
*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
*** See the bottom of this document for the declaration of the reference variables
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
-->
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![GNU License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]

<h3 align="center">Football Manager Scouting</h3>

  <p align="center">
    A tool for facilitating data-driven scouting in Football Manager
    <br />
    <a href="https://github.com/HannesLindback/Football-Manager-scouting"><strong>Explore the docs »</strong></a>
    <br />
    <br />
    <a href="https://github.com/HannesLindback/Football-Manager-scouting/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
    ·
    <a href="https://github.com/HannesLindback/Football-Manager-scouting/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
  </p>
</div>



<!-- TABLE OF CONTENTS -->
<details>
  <summary>Table of Contents</summary>
  <ol>
    <li>
      <a href="#about-the-project">About The Project</a>
      <ul>
        <li><a href="#built-with">Built With</a></li>
      </ul>
    </li>
    <li>
      <a href="#getting-started">Getting Started</a>
      <ul>
        <li><a href="#prerequisites">Prerequisites</a></li>
        <li><a href="#installation">Installation</a></li>
      </ul>
    </li>
    <li><a href="#usage">Usage</a></li>
    <li><a href="#roadmap">Roadmap</a></li>
    <li><a href="#contributing">Contributing</a></li>
    <li><a href="#license">License</a></li>
    <li><a href="#contact">Contact</a></li>
    <li><a href="#acknowledgments">Acknowledgments</a></li>
  </ol>
</details>



<!-- ABOUT THE PROJECT -->
## 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.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- GETTING STARTED -->
## 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 <a href="#readme-top">Usage</a> 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```

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- USAGE EXAMPLES -->
## 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.
)
```

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- LICENSE -->
## License

Distributed under the GNU License. See `LICENSE` for more information.

<!-- CONTACT -->
## Contact

Hannes Lindbäck - hanneskarllindback@gmail.com

Project Link: [https://github.com/HannesLindback/Football-Manager-scouting](https://github.com/HannesLindback/Football-Manager-scouting)

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge
[contributors-url]: https://github.com/HannesLindback/Football-Manager-scouting/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge
[forks-url]: https://github.com/HannesLindback/Football-Manager-scouting/network/members
[stars-shield]: https://img.shields.io/github/stars/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge
[stars-url]: https://github.com/HannesLindback/Football-Manager-scouting/stargazers
[issues-shield]: https://img.shields.io/github/issues/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge
[issues-url]: https://github.com/HannesLindback/Football-Manager-scouting/issues
[license-shield]: https://img.shields.io/github/license/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge
[license-url]: https://github.com/HannesLindback/Football-Manager-scouting/blob/master/LICENSE
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/hannes-lindback
[product-screenshot]: images/screenshot.png
[Python.org]: https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54
[Python-url]: https://python.org/
[SQLAlchemy.org]: https://img.shields.io/badge/SQLAlchemy-306998?logo=python&logoColor=white
[SQLAlchemy-url]: https://sqlalchemy.org/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "football-manager-scouting",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Hannes Lindb\u00e4ck <hanneskarllindback@gmail.com>",
    "keywords": "Football Manager, FM",
    "author": null,
    "author_email": "Hannes Lindb\u00e4ck <hanneskarllindback@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b3/0c/c0e81efab234e234e075cfda2d99bd15e58a0027b55cb5fa63d390278943/football_manager_scouting-0.1.16.tar.gz",
    "platform": null,
    "description": "<!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 -->\n<a id=\"readme-top\"></a>\n<!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Don't forget to give the project a star!\n*** Thanks again! Now go create something AMAZING! :D\n-->\n\n\n\n<!-- PROJECT SHIELDS -->\n<!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n-->\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![GNU License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n\n<h3 align=\"center\">Football Manager Scouting</h3>\n\n  <p align=\"center\">\n    A tool for facilitating data-driven scouting in Football Manager\n    <br />\n    <a href=\"https://github.com/HannesLindback/Football-Manager-scouting\"><strong>Explore the docs \u00bb</strong></a>\n    <br />\n    <br />\n    <a href=\"https://github.com/HannesLindback/Football-Manager-scouting/issues/new?labels=bug&template=bug-report---.md\">Report Bug</a>\n    \u00b7\n    <a href=\"https://github.com/HannesLindback/Football-Manager-scouting/issues/new?labels=enhancement&template=feature-request---.md\">Request Feature</a>\n  </p>\n</div>\n\n\n\n<!-- TABLE OF CONTENTS -->\n<details>\n  <summary>Table of Contents</summary>\n  <ol>\n    <li>\n      <a href=\"#about-the-project\">About The Project</a>\n      <ul>\n        <li><a href=\"#built-with\">Built With</a></li>\n      </ul>\n    </li>\n    <li>\n      <a href=\"#getting-started\">Getting Started</a>\n      <ul>\n        <li><a href=\"#prerequisites\">Prerequisites</a></li>\n        <li><a href=\"#installation\">Installation</a></li>\n      </ul>\n    </li>\n    <li><a href=\"#usage\">Usage</a></li>\n    <li><a href=\"#roadmap\">Roadmap</a></li>\n    <li><a href=\"#contributing\">Contributing</a></li>\n    <li><a href=\"#license\">License</a></li>\n    <li><a href=\"#contact\">Contact</a></li>\n    <li><a href=\"#acknowledgments\">Acknowledgments</a></li>\n  </ol>\n</details>\n\n\n\n<!-- ABOUT THE PROJECT -->\n## About The Project\n\nFootball Manager Scouting is a python program for making data driven scouting easier in the FM games.\n\nIt currently provides two scouting tools:\n\n  \u00b7 ```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.\n  \n  \u00b7 ```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.\n\nThe 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.\n\nFootball 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.\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n<!-- GETTING STARTED -->\n## Getting Started\n1) The first step is to download the data from Football Manager:\n  1a) In the scouting of the game, use the provided view from moneyball.fmf,\n  1b) Select all players, print, and save as text file (to rtf format).\n2) Create an empty PostgreSQL database,\n3) Install package: ```pip install football-manager-scouting```.\n\nSee <a href=\"#readme-top\">Usage</a> for examples of how to insert data and use Spider and Index.\n\n### Prerequisites\n\n* PostgreSQL,\n* Python >= 3.8,\n* SQLAlchemy >= 2.0\n* psycopg2-binary >= 2.0\n* tqdm >= 4.0\n* Soccerplots = 1.0\n\n### Installation\n\n```pip install football-manager-scouting```\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n<!-- USAGE EXAMPLES -->\n## Usage\n\nImport the tools.\n```\nfrom football_manager_scouting.spider import spider\nfrom football_manager_scouting.index import index\nfrom football_manager_scouting.insert_data import insert_data\n```\n\nCreate a dictionary with the login information to the PostgreSQL database.\n```\ndb_login = {\n  'user': 'username',\n  'password': 'password',\n  'host': 'localhost:5432',\n  'database': 'database'\n}\n```\n\nInsert the downloaded data to the database.\n```\ninsert_to_database(\n                   db_login=db_login,\n                   path='./data.rtf',  # The path to the downloaded file with the player data.\n                   season=24,          # The current in-game season.\n                   total=50435,        # The total number of players in the data file. For the progress bar. OPTIONAL.\n                   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.\n)              \n```\n\nCreate 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\n\n```\nspider(\n       db_login=db_login,\n       name='John Doe',           # The name of the player.\n       comparison='average',      # If the comparison should be to another player or to the average of multiple players.\n       category='DC',             # Filter which statistical categories that should be used in chart.\n       position='DC',             # The position of the players.\n       mins=500,                  # The minimum number of minutes a player should have played to be included.\n       division='Premier League'  # The division of the players.\n)\n```\n\nCreate an index csv file. The file will be saved to a csv file named after the category in the working directory.\n```\nindex(\n      db_login=db_login,\n      category='STC',       # Filter which statistical categories that should be used in the index.\n      position='STC, AMC',  # The position of the players.\n      mins=500,             # The minimum number of minutes a player should have played to be included.\n      division=None         # The division of the included players. None means that it will not filter on division.\n)\n```\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n<!-- LICENSE -->\n## License\n\nDistributed under the GNU License. See `LICENSE` for more information.\n\n<!-- CONTACT -->\n## Contact\n\nHannes Lindb\u00e4ck - hanneskarllindback@gmail.com\n\nProject Link: [https://github.com/HannesLindback/Football-Manager-scouting](https://github.com/HannesLindback/Football-Manager-scouting)\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n<!-- MARKDOWN LINKS & IMAGES -->\n<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->\n[contributors-shield]: https://img.shields.io/github/contributors/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge\n[contributors-url]: https://github.com/HannesLindback/Football-Manager-scouting/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge\n[forks-url]: https://github.com/HannesLindback/Football-Manager-scouting/network/members\n[stars-shield]: https://img.shields.io/github/stars/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge\n[stars-url]: https://github.com/HannesLindback/Football-Manager-scouting/stargazers\n[issues-shield]: https://img.shields.io/github/issues/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge\n[issues-url]: https://github.com/HannesLindback/Football-Manager-scouting/issues\n[license-shield]: https://img.shields.io/github/license/HannesLindback/Football-Manager-scouting.svg?style=for-the-badge\n[license-url]: https://github.com/HannesLindback/Football-Manager-scouting/blob/master/LICENSE\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555\n[linkedin-url]: https://linkedin.com/in/hannes-lindback\n[product-screenshot]: images/screenshot.png\n[Python.org]: https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54\n[Python-url]: https://python.org/\n[SQLAlchemy.org]: https://img.shields.io/badge/SQLAlchemy-306998?logo=python&logoColor=white\n[SQLAlchemy-url]: https://sqlalchemy.org/\n",
    "bugtrack_url": null,
    "license": " Football Manager scouting: A tool for facilitating player scouting in the video game Football Manager. Copyright (C) 2024 Hannes Lindb\u00e4ck  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.  You should have received a copy of the GNU General Public License along with this program.  If not, see <https://www.gnu.org/licenses/>.",
    "summary": "A Football Manager data-based scouting tool.",
    "version": "0.1.16",
    "project_urls": {
        "Documentation": "https://github.com/HannesLindback/Football-Manager-scouting",
        "Homepage": "https://github.com/HannesLindback/Football-Manager-scouting",
        "Repository": "https://github.com/HannesLindback/Football-Manager-scouting"
    },
    "split_keywords": [
        "football manager",
        " fm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac2213dc90aa15d72030bca667134867760aee0bd3a1c8f4f696b9007235d401",
                "md5": "38286992fa887180decf67d110b92c9e",
                "sha256": "e42c4902fe3c9b3db2aa87da92da0c36b84ca821177941ef7a082b52461b5197"
            },
            "downloads": -1,
            "filename": "football_manager_scouting-0.1.16-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "38286992fa887180decf67d110b92c9e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 29165,
            "upload_time": "2024-11-22T10:56:36",
            "upload_time_iso_8601": "2024-11-22T10:56:36.056497Z",
            "url": "https://files.pythonhosted.org/packages/ac/22/13dc90aa15d72030bca667134867760aee0bd3a1c8f4f696b9007235d401/football_manager_scouting-0.1.16-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b30cc0e81efab234e234e075cfda2d99bd15e58a0027b55cb5fa63d390278943",
                "md5": "f1965c875bcdfc0a08e7a733a2bc4894",
                "sha256": "62234715a4fda3a0d19da0f1def2d0e530e15e5f4a66ba9e70de9f2ba97a7ad2"
            },
            "downloads": -1,
            "filename": "football_manager_scouting-0.1.16.tar.gz",
            "has_sig": false,
            "md5_digest": "f1965c875bcdfc0a08e7a733a2bc4894",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 31362,
            "upload_time": "2024-11-22T10:56:37",
            "upload_time_iso_8601": "2024-11-22T10:56:37.495199Z",
            "url": "https://files.pythonhosted.org/packages/b3/0c/c0e81efab234e234e075cfda2d99bd15e58a0027b55cb5fa63d390278943/football_manager_scouting-0.1.16.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-22 10:56:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "HannesLindback",
    "github_project": "Football-Manager-scouting",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "football-manager-scouting"
}
        
Elapsed time: 0.47728s