Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 2.25 KB

README.md

File metadata and controls

62 lines (46 loc) · 2.25 KB

Fantasy Premier League 2020/2021

Inspired by the following tutorial: https://towardsdatascience.com/fantasy-premier-league-value-analysis-python-tutorial-using-the-fpl-api-8031edfe9910

Getting started

The repo is based in python3 and jupyter with jupytext for agile version control.

Install package

git clone https://github.com/martgra/fpl2021.git
cd fpl2021
python3 -m venv venv
source venv/bin/activate
# On windows venv\Scripts\activate
pip install -r requirements_dev.txt
pip install -r requirements.txt
pip install -e .

Dataset

The dataset from Fantasy Premier League is accessed by folling this link. https://fantasy.premierleague.com/api/bootstrap-static/

As of now the dataset is downloaded every 6th hour (UTC) and stored as as Azure blob "snapshot" with the format

%Y-%m-%dT%H:%M:%SZ_data.json

Access to the dataset is provided with "read only" access through:

# Download all new data from Azure Blob Storage to disk
$ fantasy storage download-all
$ fantasy storage --container 2021-fpl-data download-all

API - Other useful methods

*To use the "my team api" authentication is required. See following link https://medium.com/@bram.vanherle1/fantasy-premier-league-api-authentication-guide-2f7aeb2382e4)

Other useful links