#FPL
A tool to extract data from Fantasy Premier League.
The first step is to setup a database:
- Create an empty database named 'fpl'.
- Run
sql/fpl_s016_12_20.sqlinside the 'fpl' database. This will generate the schema for you such that the data can later be saved.
To extract the Fantasy Premier League data:
git clone https://github.com/adhorrig/fpl.gitto download the tools for extraction.cd fplto move into the directory.npm installto download the project dependencies from the node package manager.
-
Open
config.jsand enter your database connection details. -
Enter integer values for
options.a.
liveweeksis how many gameweeks of live player data you want.b.
profilesis the number of profiles you want to download.c.
gameweeksis the number of gameweek data that you want to download. -
Run
node live.js, players.js, profiles.js, teams.js, gameweeks.jsto extract and save the data.
##The data.
The FPL API returns a lot more data than what is being saved here. I only saved what I needed for my project. Feel free to modify the SQL schema and add more to the parsed JSON to reflect the changes.