-
Notifications
You must be signed in to change notification settings - Fork 1
/
expected_season_goals.html
91 lines (86 loc) · 3.88 KB
/
expected_season_goals.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Longterm Expected Goals Simulator</title>
<link rel="stylesheet" type="text/css" href="/css/basscss.min.css">
<script type="text/javascript" src="js/jquery/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.hottie.js"></script>
<script type="text/javascript" src="/templates/templates.js"></script>
<script type="text/javascript" src="/templates/ga.js"></script>
<script type="text/javascript" src="/js/d3/d3.min.js"></script>
<script type="text/javascript" src="/js/plotly/plotly.min.js"></script>
<script type="text/javascript" src="/js/chancejs/chance.min.js"></script>
<script type="text/javascript" src="/js/lz-string/lz-string.min.js"></script>
<script type="text/javascript">var page_type = "season";</script>
<link rel="shortcut icon" type="image/png" href="/favicon.png">
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@dannypage" />
<meta name="twitter:title" content="Longterm Expected Goals Simulator" />
<meta name="twitter:description" content="How (im)probable was your team or player's results? Check it out here." />
<meta name="twitter:image" content="https://dannypage.github.io/assets/images/expected_season_goals_preview.png" />
</head>
<body>
<div id="navHeader"></div>
<section class="container px1 py1">
<h1>Longterm Expected Goals Simulator</h1>
<h2>Simulate your favorite team or player's shots over a period of time.</h2>
<p><a href="https://medium.com/@dannypage/expected-goals-just-don-t-add-up-they-also-multiply-1dfd9b52c7d0" target="_blank">
Explanation of Expected Goals and why we show Standard Deviation.
</a></p>
<p><a href="/lookup.html" target="_blank">
Get values for the current seasons of the EPL and MLS to use in this simulator.
</a></p>
<div class="clearfix">
<div class="sm-col sm-col-12 px1">
<h3>Shots by Probability</h3>
<form id="calculate">
<label for="name">Name:</label>
<input id="name" value="John Smith FC" type="text" class="block col-12 mb1 field">
<label for="chances">Expected Goal Values:</label>
<input id="chances" type="text" class="block col-12 mb1 field">
<label for="goals">Actual Goals:</label>
<input id="goals" type="text" class="block col-2 mb1 field">
<a type="button" class="button" onclick="simulateLongTermExpectedGoals()">Calculate</a>
</form>
</div>
<div class="col sm-col-12 px1">
<h3>Summary Results</h3>
<table class="table-light overflow-hidden bg-white border rounded">
<thead><tr>
<th>Goals</th><th>M|A|Dev</th>
<th>Under %</th><th>Exact %</th><th>Over %</th>
</tr></thead>
<tbody>
<tr>
<td><span id="averageGoals"></span></td>
<td>+/- <span id="meanAbsoulteGoals"></span></td>
<td><span id="under"></span> %</td>
<td><span id="exact"></span> %</td>
<td><span id="over"></span> %</td>
</tr>
</tbody>
</table>
<h4>What does this mean?</h4>
<p class="col"><span id='explanation'></span></p>
<h3>Share these results!</h3>
<a id="shareURLlink" href="" >Right Click -> Copy Link Address</a>
<h3>Graphs</h3>
<div id="goalsChart"></div>
</div>
</div>
<script type="text/javascript" src="/js/internal/xg.js"></script>
<script type="text/javascript">
//On Load
simulateLongTermExpectedGoals();
$('#calculate').keyup(function(event) {
if(event.keyCode === 13) {
simulateLongTermExpectedGoals();
}
});
</script>
</section>
<div id="navFooter"></div>
</body>
</html>