2014/2015 League Graphs Data Dump
Season 2014/2015 Data Dump
This post really just represents a data dump of the information we have from the season 2014/2015. From the data available from football-data I've calculated some statistics and graphed those for the top four English leagues and the Scottish Premiership. I've mostly graphed each statitic against Points, but I've also done some Home/Away graphs. If you'd like any others, let me know in the comments.
In [1]:
from IPython.display import display, HTML
%matplotlib inline
import league_analysis
In [2]:
epl_league = league_analysis.year_201415.epl_league
ech_league = league_analysis.year_201415.ech_league
elo_league = league_analysis.year_201415.elo_league
elt_league = league_analysis.year_201415.elt_league
spl_league = league_analysis.year_201415.spl_league
all_leagues = [epl_league, ech_league, elo_league, elt_league, spl_league]
In [3]:
league_analysis.graph_leagues('TSR', 'Points', leagues=[epl_league],
annotate_teams=['Chelsea', 'Liverpool', 'Man City', 'QPR', 'Swansea', 'Arsenal'])
In [4]:
for statistic in league_analysis.interesting_stats:
display(HTML('<h2>Points versus {0}</h2>'.format(statistic)))
league_analysis.graph_leagues(statistic, 'Points', leagues=all_leagues)
In [5]:
league_analysis.graph_leagues('Points', 'Team Rating', leagues=all_leagues)
In [6]:
league_analysis.graph_leagues('Home Points', 'Away Points', leagues=all_leagues,
get_x_stat=lambda l,t: l.home_team_stats[t].points,
get_y_stat=lambda l,t: l.away_team_stats[t].points
)
In [7]:
league_analysis.graph_leagues('Points', 'PDO', leagues=all_leagues)
In [8]:
league_analysis.graph_leagues('Points', 'TSOTR', leagues=all_leagues)
In [9]:
league_analysis.graph_leagues('SOT For Ratio', 'SOT Against Ratio', leagues=all_leagues)
In [10]:
league_analysis.graph_leagues('SOT For', 'SOT Against', leagues=all_leagues)
In [11]:
league_analysis.graph_leagues('Points', 'TSOTR', leagues=all_leagues)
In [12]:
league_analysis.graph_leagues('Points', 'Goals Against', leagues=all_leagues)
In [13]:
league_analysis.graph_leagues('Points', 'Goals For', leagues=all_leagues)
In [14]:
league_analysis.graph_leagues('Points', 'TSR', leagues=all_leagues)
In [15]:
league_analysis.graph_leagues('All Points', 'Home Points', leagues=all_leagues,
get_x_stat=lambda l, t: l.team_stats[t].points,
get_y_stat=lambda l, t: l.home_team_stats[t].points)
In [16]:
league_analysis.graph_leagues('All Points', 'Away Points', leagues=all_leagues,
get_x_stat=lambda l, t: l.team_stats[t].points,
get_y_stat=lambda l, t: l.away_team_stats[t].points)
Comments
Comments powered by Disqus