{ "info": { "author": "G\u00f6ktu\u011f Erce G\u00fcrel", "author_email": "goktugercegurel@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![Build Status](https://travis-ci.org/goktugerce/fantasy-premier-league.svg?branch=master)](https://travis-ci.org/goktugerce/fantasy-premier-league)\n## Fantasy Premier League variants Stats and Visualization\n\nThis project contains a package for collecting captaincy, chip usage, ownership, effective ownership, template team stats from [Fantasy Premier League](https://fantasy.premierleague.com), [Fantasy Allsvenskan](https://en.fantasy.allsvenskan.se), and [Fantasy Eliteserien](http://en.fantasy.eliteserien.no).\n\n## Installation\n\nTo be able to run the package, you have to have Python 3+ installed on your computer.\n\nCheck if you have python and pip available. If not [you have to install them](https://www.python.org/downloads/).\n\nAfter running the following command, you are ready to go:\n\n`pip install fantasy-premier-league-stats`\n\n## Usage\n\nFirst, you have to choose one of the games: `FPL`, `ALLSVENSKAN` or `ELITESERIEN`.\n\nTo be able to collect stats and create visualizations, you need to get player information and also the teams. \n\n```\nplayers = api.get_players(game)\nteam_ids = api.get_league(league_id, max_players, game)\nteams = api.get_league_team_picks(team_ids, gameweek, game)\n```\n\nAfter this, you can get the statistics and plot them if you want (after necessary imports):\n\n```\nchip_usage = chips.get_weekly_chip_usage(teams, percentage=True)\ncaptaincy = captains.get_captaincy_stats(teams, players, percentage=True)\nownership_stats = ownership.get_ownership_stats(teams, players)\neffective_ownership_stats = ownership.get_effective_ownership_stats(teams, players)\ntemplate = template_team.create_template_team(teams, players, effective=True, percentage=True, with_team=True)\n\nplots.draw_chip_usage(chip_usage)\nplots.draw_captaincy_stats(captaincy)\nplots.draw_ownership_stats(ownership_stats)\nplots.draw_effective_ownership_stats(effective_ownership_stats)\nplots.draw_template_team(template, game)\n```\n\nYou can either see the plots while running your script or save them to a path of your choice.\n\nAnother point is that team picks are cached in path `~/.fpl` folder, and if you do not want to download team picks again, you can add `overwrite=False` to `api.get_league_team_picks` function call. If you want to clear the directory, you can run `clear_directory` function in `utilities`.\n\n## Future Improvements and Contributing\n\nI do not plan to enhance the package into containing live stats, but all contributions are welcome. You can create issues for feature requests and bugs. You can also contribute by adding features and creating pull requests.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/goktugerce/fantasy-premier-league", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "fantasy-premier-league-stats", "package_url": "https://pypi.org/project/fantasy-premier-league-stats/", "platform": "", "project_url": "https://pypi.org/project/fantasy-premier-league-stats/", "project_urls": { "Homepage": "https://github.com/goktugerce/fantasy-premier-league" }, "release_url": "https://pypi.org/project/fantasy-premier-league-stats/0.0.2/", "requires_dist": [ "requests", "jsonpickle", "pandas", "matplotlib", "seaborn", "Pillow" ], "requires_python": "", "summary": "Stats and Visualizations for FPL, Fantasy Allsvenskan and Fantasy Eliteserien", "version": "0.0.2" }, "last_serial": 5485230, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "cf5632948c36cfc1b90e9f3d52bbf2b2", "sha256": "3a549875212b06697558f6977c1a480f3bffe80092ab9cb1c7f7e3fc2a0c3c56" }, "downloads": -1, "filename": "fantasy_premier_league_stats-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cf5632948c36cfc1b90e9f3d52bbf2b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23505, "upload_time": "2019-07-03T22:50:04", "url": "https://files.pythonhosted.org/packages/4a/29/19ce7060c5d62ace3b6c87eeb3709264d529756da8c05a0e33d39f2c00d3/fantasy_premier_league_stats-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b34ef1998c4b026bca0ae10d4d75b910", "sha256": "d111c7e236babdbc6a37a67d2a243b6770753687bb40ab18a1be7e7fb4381adc" }, "downloads": -1, "filename": "fantasy-premier-league-stats-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b34ef1998c4b026bca0ae10d4d75b910", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17763, "upload_time": "2019-07-03T22:50:07", "url": "https://files.pythonhosted.org/packages/e0/73/d81c3010d90402af92796011096f14a97de1ac4b28dce54be0a9c0889100/fantasy-premier-league-stats-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "f3e11675146b8a31ab6a0cf5203a113f", "sha256": "5c008a63087030b2f450349de9ae21a8ec5fb77a49e5f4057e72d5dc4d903bbe" }, "downloads": -1, "filename": "fantasy_premier_league_stats-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f3e11675146b8a31ab6a0cf5203a113f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 24358, "upload_time": "2019-07-04T07:05:51", "url": "https://files.pythonhosted.org/packages/42/8a/fa4a0eb372f23558183ed8182efbb7826717be2658816f03e1f0d378c31e/fantasy_premier_league_stats-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5775e80e476be282750234fd141935a3", "sha256": "07b2e6d0cb287ea7535766d27e7d6307e82db581888db6eb80bb086c6745e523" }, "downloads": -1, "filename": "fantasy-premier-league-stats-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5775e80e476be282750234fd141935a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18106, "upload_time": "2019-07-04T07:05:53", "url": "https://files.pythonhosted.org/packages/51/b2/b8e6aa543cfad0719861eef91bc173d13e26954d083f9c4b28daaeeb5c74/fantasy-premier-league-stats-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f3e11675146b8a31ab6a0cf5203a113f", "sha256": "5c008a63087030b2f450349de9ae21a8ec5fb77a49e5f4057e72d5dc4d903bbe" }, "downloads": -1, "filename": "fantasy_premier_league_stats-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f3e11675146b8a31ab6a0cf5203a113f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 24358, "upload_time": "2019-07-04T07:05:51", "url": "https://files.pythonhosted.org/packages/42/8a/fa4a0eb372f23558183ed8182efbb7826717be2658816f03e1f0d378c31e/fantasy_premier_league_stats-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5775e80e476be282750234fd141935a3", "sha256": "07b2e6d0cb287ea7535766d27e7d6307e82db581888db6eb80bb086c6745e523" }, "downloads": -1, "filename": "fantasy-premier-league-stats-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5775e80e476be282750234fd141935a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18106, "upload_time": "2019-07-04T07:05:53", "url": "https://files.pythonhosted.org/packages/51/b2/b8e6aa543cfad0719861eef91bc173d13e26954d083f9c4b28daaeeb5c74/fantasy-premier-league-stats-0.0.2.tar.gz" } ] }