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'])
line of best fit: 195.7 x - 45.61
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)

Points versus Shots For

line of best fit: 0.1662 x - 29.48
line of best fit: 0.1544 x - 34.06
line of best fit: 0.1493 x - 11.35
line of best fit: 0.1974 x - 28.89
line of best fit: 0.1744 x - 13.14

Points versus Shots Against

line of best fit: -0.1519 x + 127.1
line of best fit: -0.09206 x + 119.9
line of best fit: -0.08902 x + 107.3
line of best fit: -0.1406 x + 128.8
line of best fit: -0.198 x + 128.8

Points versus TSR

line of best fit: 195.7 x - 45.61
line of best fit: 184.4 x - 29.86
line of best fit: 133.1 x - 3.673
line of best fit: 220.7 x - 47.45
line of best fit: 169.5 x - 31.23

Points versus Goals For

line of best fit: 1.03 x + 2.129
line of best fit: 0.8858 x + 8.013
line of best fit: 0.8286 x + 12.41
line of best fit: 1.248 x - 5.259
line of best fit: 1.073 x + 0.849

Points versus Goals Against

line of best fit: -1.334 x + 117.4
line of best fit: -1.114 x + 130.8
line of best fit: -1.098 x + 129.9
line of best fit: -0.9991 x + 118
line of best fit: -1.055 x + 105

Points versus SOT For

line of best fit: 0.4355 x - 17.2
line of best fit: 0.3898 x - 16.32
line of best fit: 0.3084 x - 0.1482
line of best fit: 0.3778 x - 6.667
line of best fit: 0.4141 x - 14.34

Points versus SOT Against

line of best fit: -0.4036 x + 116.8
line of best fit: -0.3411 x + 131.3
line of best fit: -0.2345 x + 110.9
line of best fit: -0.4098 x + 139
line of best fit: -0.4311 x + 123.8

Points versus SOT For Ratio

line of best fit: 470.4 x - 99.45
line of best fit: 387.1 x - 62.28
line of best fit: 73.37 x + 32.81
line of best fit: 265.1 x - 41.65
line of best fit: -99.14 x + 95.97

Points versus SOT Against Ratio

line of best fit: -11.82 x + 56.19
line of best fit: -253.1 x + 144.3
line of best fit: -167.5 x + 131.8
line of best fit: -223.7 x + 151.9
line of best fit: -333.4 x + 195.6

Points versus TSOTR

line of best fit: 203.2 x + 52.81
line of best fit: 306 x + 62.84
line of best fit: 104.5 x + 62.98
line of best fit: 194.3 x + 63.44
line of best fit: 192.1 x + 52.71

Points versus Goals SOT For Ratio

line of best fit: 277.5 x - 31.2
line of best fit: 283.3 x - 22.65
line of best fit: 154.7 x + 16.93
line of best fit: 84.06 x + 38.11
line of best fit: 276.7 x - 28.73

Points versus Goals SOT Against Ratio

line of best fit: -168 x + 103.7
line of best fit: -315.1 x + 158
line of best fit: -153.3 x + 109
line of best fit: -136.5 x + 103.6
line of best fit: -184.6 x + 107.8

Points versus PDO

line of best fit: 188.3 x + 53.25
line of best fit: 206.2 x + 63.02
line of best fit: 115.2 x + 63.26
line of best fit: 146 x + 62.86
line of best fit: 193.4 x + 53.06

Points versus Team Rating

line of best fit: 113.9 x + 52.59
line of best fit: 140.6 x + 62.57
line of best fit: 100.4 x + 62.95
line of best fit: 137.5 x + 62.83
line of best fit: 97.47 x + 53.33
In [5]:
league_analysis.graph_leagues('Points', 'Team Rating', leagues=all_leagues)
line of best fit: 0.007405 x - 0.3898
line of best fit: 0.005089 x - 0.3188
line of best fit: 0.0071 x - 0.4469
line of best fit: 0.005704 x - 0.3578
line of best fit: 0.008859 x - 0.4724
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
              )
line of best fit: 0.7017 x + 0.5345
line of best fit: 0.7083 x + 2.485
line of best fit: 0.5182 x + 11.46
line of best fit: 0.4229 x + 11.57
line of best fit: 0.6463 x + 5.316
In [7]:
league_analysis.graph_leagues('Points', 'PDO',  leagues=all_leagues)
line of best fit: 0.002816 x - 0.1522
line of best fit: 0.003612 x - 0.2284
line of best fit: 0.003291 x - 0.2098
line of best fit: 0.002 x - 0.124
line of best fit: 0.00329 x - 0.1741
In [8]:
league_analysis.graph_leagues('Points', 'TSOTR',  leagues=all_leagues)
line of best fit: 0.001352 x - 0.07303
line of best fit: 0.001621 x - 0.1026
line of best fit: 0.0008891 x - 0.05621
line of best fit: 0.001691 x - 0.1081
line of best fit: 0.001031 x - 0.05175
In [9]:
league_analysis.graph_leagues('SOT For Ratio', 'SOT Against Ratio', leagues=all_leagues)
line of best fit: -0.1258 x + 0.3655
line of best fit: -0.08169 x + 0.3498
line of best fit: -0.06831 x + 0.4393
line of best fit: -0.3221 x + 0.5241
line of best fit: 0.168 x + 0.3546
In [10]:
league_analysis.graph_leagues('SOT For', 'SOT Against', leagues=all_leagues)
line of best fit: -0.5484 x + 247.3
line of best fit: -0.2621 x + 254.9
line of best fit: -0.6505 x + 337.7
line of best fit: -0.7356 x + 321
line of best fit: -0.7178 x + 280.7
In [11]:
league_analysis.graph_leagues('Points', 'TSOTR', leagues=all_leagues)
line of best fit: 0.001352 x - 0.07303
line of best fit: 0.001621 x - 0.1026
line of best fit: 0.0008891 x - 0.05621
line of best fit: 0.001691 x - 0.1081
line of best fit: 0.001031 x - 0.05175
In [12]:
league_analysis.graph_leagues('Points', 'Goals Against', leagues=all_leagues)
line of best fit: -0.5073 x + 75.31
line of best fit: -0.5672 x + 96.82
line of best fit: -0.6829 x + 104
line of best fit: -0.6854 x + 98.2
line of best fit: -0.7891 x + 91
In [13]:
league_analysis.graph_leagues('Points', 'Goals For', leagues=all_leagues)
line of best fit: 0.8405 x + 4.747
line of best fit: 0.918 x + 4.115
line of best fit: 0.9703 x - 0.08616
line of best fit: 0.4196 x + 28.35
line of best fit: 0.6869 x + 12.28
In [14]:
league_analysis.graph_leagues('Points', 'TSR', leagues=all_leagues)
line of best fit: 0.003458 x + 0.3195
line of best fit: 0.001777 x + 0.3895
line of best fit: 0.003283 x + 0.2941
line of best fit: 0.002526 x + 0.3417
line of best fit: 0.004317 x + 0.2686
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)
line of best fit: 0.5324 x + 2.579
line of best fit: 0.5028 x + 3.697
line of best fit: 0.5549 x - 1.017
line of best fit: 0.4924 x + 5.165
line of best fit: 0.5132 x + 1.795
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)
line of best fit: 0.4676 x - 2.579
line of best fit: 0.4972 x - 3.697
line of best fit: 0.4451 x + 1.017
line of best fit: 0.5076 x - 5.165
line of best fit: 0.4868 x - 1.795

Comments

Comments powered by Disqus