GitRead 中文社区
首页趋势排行榜原创文章严选周刊
更多资源
新手训练营
精选专题热门话题GitHub 文档资源精选实战指南

Fantasy-Premier-League

Creates a .csv file of all players in the English Player League with their respective team and total fantasy points

  • 语言Python
  • 默认分支master
  • 大小179.2 MB
  • 更新2 周前
  • Issues37
在 GitHub 打开
avatarvaastav

项目介绍

vaastav/Fantasy-Premier-League 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 Other 许可证,目前获得 1.8k 个 Star、905 次 Fork。

仓库全名
vaastav/Fantasy-Premier-League

README 摘要

Fantasy-Premier-League ====================== NOTICE This weekly updates for the repository have been stopped at the end of the 2024-25 season. NO weekly updates will be posted to this repository after the 2024-25 season. Instead, there will be 3 major updates posted to this repository: One at the start of the season One at the end of the January transfer window One at the end of the season Description A FPL library…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Fantasy-Premier-League 用什么语言开发?

主要使用 Python 编写,采用 Other 许可证,目前有 1.8k 个 Star。

Fantasy-Premier-League 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 Fantasy-Premier-League 的源码?

可以直接克隆仓库:git clone https://github.com/vaastav/Fantasy-Premier-League.git,默认分支为 master;安装与运行步骤见仓库 README。

Fantasy-Premier-League 最近还在维护吗?

仓库最近一次更新为 2 周前,当前有 37 个未关闭 Issue;Star 数为 1.8k,可作为社区活跃度的参考。

本页面展示项目元数据与原始 README,GitRead 中文社区 编辑团队负责选题收录。

相关仓库

public-apis/public-apis avatar
public-apispublic-apis
3 天前
498.1k
54.3k
66

免费 API 汇总列表

apipublic-apisfree+7
Python
15.5 MB
7
详情
EbookFoundation/free-programming-books avatar
free-programming-booksEbookFoundation
3 天前
401.5k
67.6k
99

免费可获取的编程书籍

bookseducationhacktoberfest+2
Python
21.8 MB
3
详情
donnemartin/system-design-primer avatar
system-design-primerdonnemartin
9月15日
377.6k
59.3k
647

学习如何设计大规模系统。为系统设计面试做准备。包含 Anki 闪卡。

designdesign-patternsdesign-system+10
Python
11.0 MB
0
详情
vinta/awesome-python avatar
awesome-pythonvinta
2 天前
333.9k
28.0k
0

回答“我想用 Python 做 X,该用哪个工具?”的权威清单

awesomeawesome-listpython+3
Python
6.9 MB
2
详情
practical-tutorials/project-based-learning avatar
project-based-learningpractical-tutorials
2 天前
289.5k
36.8k
237

精选的项目实战教程列表

tutorialprojectbeginner-project+5
Python
472 KB
1
详情
NousResearch/hermes-agent avatar
hermes-agentNousResearch
1 小时前
262.5k
58.7k
54.0k

与你共同成长的智能体

aiai-agentai-agents+10
Python
1.4 GB
3
详情
TheAlgorithms/Python avatar
PythonTheAlgorithms
1 周前
226.0k
51.3k
94

所有算法均用 Python 实现

algorithmalgorithm-competitionsalgorithms-implemented+11
Python
17.9 MB
2
详情
yt-dlp/yt-dlp avatar
yt-dlpyt-dlp
1 周前
206.8k
18.0k
2.1k

功能丰富的命令行音视频下载器

youtube-dlpythonsponsorblock+4
Python
63.5 MB
0
详情

关于

fantasy-premier-leaguefplfpl-analysispython
  • Other
  • 1.8k Stars
  • 905 Forks
  • 147 Watching

简要分析

热度分
3779
价值分
1377
活跃状态
活跃
GitHub

语言占比

Python

贡献者

vaastavvaastavravgeetdhillonravgeetdhillonJashiorJashiorvimrajeshvimrajeshdoug-ellisdoug-ellisjcheong0428jcheong0428EdwardAnalyticsEdwardAnalyticsinfinitetrooperinfinitetrooperashharrison90ashharrison90DanielIlaroDanielIlaroMr-Neutr0nMr-Neutr0nritviyerritviyer

GitSpo Mentions paypal

Fantasy-Premier-League

NOTICE

This weekly updates for the repository have been stopped at the end of the 2024-25 season. NO weekly updates will be posted to this repository after the 2024-25 season.

Instead, there will be 3 major updates posted to this repository:

  • One at the start of the season
  • One at the end of the January transfer window
  • One at the end of the season

Description

A FPL library that gets all the basic stats for each player, gw-specific data for each player and season history of each player

How to CIte this dataset?

BibTeX:

@misc{anand2016fantasypremierleague,
  title = {{FPL Historical Dataset}},
  author = {Anand, Vaastav},
  year = {2022},
  howpublished = {Retrieved August 2022 from \url{https://github.com/vaastav/Fantasy-Premier-League/}}
}

Acknowledgement

  • rin-hairie for adding master team lists and merge scripts
  • ergest for adding merged_gw.csv files for 2016-17 and 2017-18 seasons
  • BDooley11 for providing top managers script
  • speeder1987 for providing 2018/19 fixtures.csv file
  • ravgeetdhillon for github actions automation for data update
  • kz4killua for fixing GW37 data for the 21-22 season
  • SaintJuniper for id-dictionary update for the 21-22 season

FAQ

Data Structure

The data folder contains the data from past seasons as well as the current season. It is structured as follows:

  • season/cleaned_players.csv : The overview stats for the season
  • season/gws/gw_number.csv : GW-specific stats for the particular season
  • season/gws/merged_gws.csv : GW-by-GW stats for each player in a single file
  • season/players/player_name/gws.csv : GW-by-GW stats for that specific player
  • season/players/player_name/history.csv : Prior seasons history stats for that specific player.

Accessing the Data Directly in Python

You can access data files within this repository programmatically using Python and the pandas library. Below is an example using the data/2023-24/gws/merged_gw.csv file. Similar methods can be applied to other data files in the repository. Note this is using the raw URL for direct file access, bypassing the GitHub UI.

import pandas as pd

# URL of the CSV file (example)
url = "https://raw.githubusercontent.com/vaastav/Fantasy-Premier-League/master/data/2023-24/gws/merged_gw.csv"

# Read the CSV file into a pandas DataFrame
df = pd.read_csv(url)

Data Dictionary

For a comprehensive explanation of all variables and columns in the dataset, see the DATA_DICTIONARY.md file.

Player Position Data

In players_raw.csv, element_type is the field that corresponds to the position. 1 = GK 2 = DEF 3 = MID 4 = FWD

Errata

  • GW35 expected points data is wrong (all values are 0).

xP column — potential lookahead for ML models

The xP column in gws/merged_gw.csv is sourced from the FPL bootstrap-static API’s ep_this field. The scraper runs after each gameweek ends, so if FPL updates ep_this post-match, the scraped value will contain information that was not available to managers before the deadline. FPL’s update cadence for ep_this is not documented, so the exact behaviour is uncertain.

Empirical comparisons suggest the scraped xP values diverge from live pre-match ep_this:

  • Live API ep_this vs form correlation (fetched pre-deadline): ~0.98
  • Scraped xP vs form correlation (this dataset): ~0.75
  • xP rolling-3 vs same-GW total_points correlation: ~0.40 (unusually high for a genuinely pre-match feature)

If you are training ML models on this dataset: treat xP as potentially post-match. Either apply shift(1) within each element group, or exclude the column entirely. Using it unshifted as a feature to predict same-GW total_points has been observed to cause severe lookahead bias.

See this analysis for the full investigation.

Contributing

  • If you feel like there is some data that is missing which you would like to see, then please feel free to create a PR or create an issue highlighting what is missing and what you would like to be added
  • If you have access to old data (pre-2016) then please feel free to create Pull Requests adding the data to the repo or create an issue with links to old data and I will add them myself.

Using

If you use data from here for your website or blog posts, then I would humbly request that you please add a link back to this repo as the data source (and I would in turn add a link to your post/site as a notable usage of this repo).

Downloading Your Team Data

You can download the data for your team by executing the following steps:

python teams_scraper.py <team_id>
#Eg: python teams_scraper.py 4582

This will create a new folder called “team_<team_id>_data18-19” with individual files of all the important data

Notable Usages of this Repository

  • Picking the Ultimate Fantasy Premier League Team with ArcticDB by Matthew Simpson

  • Analysing Fantasy Premier League data in R Course by Arif P. Sulistiono

  • Point Predictor via Random Forests by Francesco Barbara

  • Money (Foot)Ball – how will our virtual football team selected entirely by Machine Learning compete in the big leagues?

  • An introduction to SQL using FPL data by Liam Connors

  • Hindsight Optimization for FPL by Sertalp B. Cay

  • Data Science to get top 1% on return to FPL by James Asher

  • FPLDASH: A customizable Fantasy Premier League Dashboard by Jin Hyun Cheong

  • How to win at Fantasy Football with Splunk and Machine Learning by Rupert Truman

  • 2019-20 Winner Joshua Bull’s Oxford Maths Public Lecture

  • 2019-20 Lottery Analysis by @theFPLKiwi

  • Fantasy Nutmeg Website by code247

  • Fantasy Premier League 19/20, a review by Hersh Dhillon

  • Visualisasi Data: Fantasy Premier League 19/20 by Erwindra Rusli

  • Machine Learning Model by pratz

  • xA vs xG for Attacking Midfielders/Forwards by u/JLane1996

  • Expected Goals vs Actual Goals for Manchester United by u/JLane1996

  • Tableau Viz by u/richkelana

  • Top Players against GW13 rival by u/LiuSiuMing

  • Captaincy Choice GW4 2019-20 post by Matthew Barnfield

  • Building a dataset for Fantasy Premier League analysis by djfinnoy

  • Value in FPL 2019-20 Report by Who Got The Assist?

  • Talisman Theory 2018-19 Report by Who Got The Assist?

  • Historical Analyses in fplscrapR by Rasmus Chrisentsen

  • Linearly Optimising Fantasy Premier League Teams by Joseph O’Connor

  • How to Win at Fantasy Premier league using Deep learning by Paul Solomon

  • graphql API by u/jeppews

  • FPL modeling and prediction by @alsgregory

  • FPL.co.id Talismans by @FPL_COID

  • Leicester City Brendan Rodgers Impact Analysis on twitter by @neilswmurrayFPL

  • Stat Analysis on twitter by @StatOnScout

  • Arsenal-Chelsea LinkedIn article by Velko Kamenov

  • Form vs Fixture Medium article by JinHyunCheong

  • Visualization by u/dkattir

  • Visualization by u/Dray11

  • Visualization website by @antoniaelek

  • FPL Captain Classifier by Raghunandh GS

  • My Personal Blog

  • FPL.zoid.dev - Query FPL data with SQL in your browser

  • Premier League Table by FPL Points by Edward F

  • FPL Manager Medals by Edward F

  • SiegFPL by @infinitetrooper

评论

登录 后发表评论
暂无评论
GitRead 中文社区
深度解读 · 趋势洞察 · 价值精选

关于

关于我们联系我们编辑准则收录标准赞赏人员

发现

技术趋势新手训练营资源精选实战指南精选专题热门话题GitHub 文档

条款

隐私政策服务条款网站地图
26.9万收录项目
6.2万中文话题
155精选专题
发现技术价值,连接开源智慧
© 2026 GitRead · GitHub 中文社区 本站与 GitHub, Inc. 无隶属关系;GitHub 是 GitHub, Inc. 的商标。