All Projects → spinach → FantasyPremierLeague.py

spinach / FantasyPremierLeague.py

Licence: other
⚽ Statistics for your mini leagues.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to FantasyPremierLeague.py

fantasy-tools
A suite of tools for fantasy football players
Stars: ✭ 37 (-69.92%)
Mutual labels:  fantasy-football, fantasy
ff
A fantasy football draft assistant with projections from ESPN, CBS, and NFL
Stars: ✭ 30 (-75.61%)
Mutual labels:  fantasy-football, fantasy
fplscrapR
This package enables those interested in Fantasy Premier League to perform detailed data analysis of the game, using the FPL's JSON API. The fplscrapR functions help R users collect and parse data from the Official Fantasy Premier League website.
Stars: ✭ 64 (-47.97%)
Mutual labels:  fantasy-football, fantasy-premier-league
FPLbot
A bot made for /r/FantasyPL
Stars: ✭ 54 (-56.1%)
Mutual labels:  fantasy-football, fantasy-premier-league
WorldSim
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Stars: ✭ 19 (-84.55%)
Mutual labels:  fantasy
vue-audio
A simple audio player based on Vue 2.x which supports single, loop, order, circulation, and random mode
Stars: ✭ 41 (-66.67%)
Mutual labels:  player
sleeper-api-wrapper
A Python wrapper for the Sleeper Fantasy Football API.
Stars: ✭ 41 (-66.67%)
Mutual labels:  fantasy-football
ycl
Search, Play, Download youtube videos from the terminal
Stars: ✭ 20 (-83.74%)
Mutual labels:  player
btsa
Berlin Time Series Analysis Repository
Stars: ✭ 60 (-51.22%)
Mutual labels:  statistics
useAudioPlayer
Custom React hook & context for controlling browser audio
Stars: ✭ 176 (+43.09%)
Mutual labels:  player
VideoPlayerBot
An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. This is Also The Source Code of The Bot Which is Being Used In Our Support Group! ❤️
Stars: ✭ 187 (+52.03%)
Mutual labels:  player
ppplay
An old-fashioned Module Player
Stars: ✭ 27 (-78.05%)
Mutual labels:  player
FPL-Analytics
Data analysis and visualizations using official APIs of Fantasy Premier League (https://fantasy.premierleague.com/)
Stars: ✭ 13 (-89.43%)
Mutual labels:  fantasy-premier-league
unbound-dns-firewall
DNS-Firewall Python script for UNBOUND
Stars: ✭ 23 (-81.3%)
Mutual labels:  python-script
roc comparison
The fast version of DeLong's method for computing the covariance of unadjusted AUC.
Stars: ✭ 83 (-32.52%)
Mutual labels:  statistics
ghstats
Python script to obtain GitHub Release download count and other statistics.
Stars: ✭ 31 (-74.8%)
Mutual labels:  python-script
shogi-player
将棋の棋譜を再生したり盤面を編集したりします
Stars: ✭ 42 (-65.85%)
Mutual labels:  player
covid-19-bitbar-plugin
Bitbar plugin for covid-19 data.
Stars: ✭ 98 (-20.33%)
Mutual labels:  python-script
p2p-cdn-sdk-android
Free p2p cdn android github sdk to reduce video streaming costs of live and on demand video using webrtc by upto 90% and improve scalability by 6x - 🚀 Vadootv 🚀
Stars: ✭ 39 (-68.29%)
Mutual labels:  player
HashExploit
HashExpoit is Great Tool For Cracking Hash
Stars: ✭ 17 (-86.18%)
Mutual labels:  python-script

FantasyPremierLeague-Api-Python

FantasyPremierLeague-Api-Python helps you access the data of the Fantasy PremierLeague game. It is intended for use by people who want to get statistical data around the game for fun. For now, there is a cool example where you can get interesting statistics about your mini league.

For now, you can get 2 main things out of the python script:

  • Distribution of players that are being picked in a specific League and GameWeek
  • Distribution of players being captained in a specific League and GameWeek

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisities

After cloning the project, you need to have Python 2.7 installed on your machine. Go to Download Python 2.7.12

If you want to use Python 3, check branch python3.

You also need to have the requests, tqdm and unicodecsv library on your machine. Run the following on your terminal:

pip install -r requirements.txt

Or you can install individually by

pip3 install requests tqdm unicodecsv

Usage

For now, you can get 2 main things out of the python script:

  • Distribution of players that are being picked in a specific League and GameWeek
  • Distribution of players being captained in a specific League and GameWeek

Follow these easy steps to get these results for your league:

  1. Go to https://fantasy.premierleague.com/ and login.
  2. Go to leagues, and then click on the league you want to analyse
  3. Check out the URL. It will be something like https://fantasy.premierleague.com/a/leagues/standings/336217/classic. Save the 336217 number, which is your league entry id.
  4. Decide what GameWeek you want to analyse, let's say it's 2, and then check what type of league it is (whether h2h or classic)
  5. Run the following command at the root of your project by inserting your specific league entry Id and GameWeek Number: python playersPickedInLeague.py --league 336217 --gameweek 2 --type classic or python playersPickedInLeague.py -l 336217 -g 2 -t classic. For h2h leagues, replace classic with h2h.

Warning: If you get an SSLError issue, then try using the python3 branch. More details about the issue can be found in #2.

Voila, you should be able to see 2 csv files created at the output folder of your project

Also if you want to run in debug mode now add argument -d True or --debug True in above command line

How to Contribute

This is just an example of what you can do with the fpl apis. I'm sure there are lots of cool ideas, so feel free to suggest by submitting an issue, or even write it yourself and send me a PR :)

DONE

TODO

  • Idea: Output file with every player selected per manager in league
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].