-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis.html
117 lines (109 loc) · 4.81 KB
/
analysis.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Scouting Analysis</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<script src="lib/vue.js"></script>
<script src="lib/vue-resource.min.js"></script>
<script src="lib/lodash.min.js"></script>
<script src="lib/stats.js"></script>
<script src="lib/sweetalert2.min.js"></script>
<link rel="stylesheet" href="css/sweetalert2.min.css">
<link rel="stylesheet" href="css/lit.css">
<link rel="stylesheet" href="css/util.css">
<script>
// quantile = ss.quantile(list, 0.5);
</script>
<style>
.g {
color: green;
}
.r {
color: red;
}
.blue {
color: blue;
}
.red {
color: red;
}
.big {
font-size: 1.1em;
}
</style>
</head>
<body class="mt0">
<h4 class="m0 tc caps tracked bg-accent white pv1">Scouting Analysis</h4>
<div id="app" class="c">
<div class="row card">
<div class="ph2 inline"><a href="#analysis">Team Analysis</a></div>
<div class="ph2 inline"><a href="/">App</a></div>
<div class="ph2 inline"><a href="/backup.html">Backup</a></div>
<div class="ph2 inline"><a href="/download">Download</a></div>
<div class="ph2 inline"><a @click="showRank = !showRank">Rankings</a></div>
</div>
<table class="w-100" v-if="showRank">
<thead>
<tr>
<th>Number</th>
<th>Team</th>
<th>Score</th>
</tr>
</thead>
<tbody>
<tr v-for="(team, i) in getAllTeams">
<td>{{i+1}}</td>
<td><a @click="data.unshift(team)">{{team.team[0]}}</a></td>
<td>{{team.rankScore}}</td>
</tr>
</tbody>
</table>
<div class="ph2" id="#analysis">
<input type="text" class="card" placeholder="Team Number" v-model="team" @keyup.enter="submit">
<button class="btn primary" @click="submit">Add</button>
</div>
<div class="row" v-for="teams in _.chunk(data, 3)">
<div class="4 col card" v-for="team in teams">
<h4 class="m0">{{s.mode(team.team)}}</h4>
<div>
Matches: [<span v-for="(item, i) in team.match" :class="team.color[i]">{{item}}, </span>]
<br>
<h5>Auton</h5>
<hr> Crosses Line: [<span v-for="(item, i) in team.a_movement" :class="{ g: item=='cross', r: item!='cross' }">{{team.match[i]}}, </span>]
<br> Start Position: [<span v-for="(item, i) in team.a_start_pos">{{team.match[i]}}: {{item}}, </span>]
<br> Avg Switch Cubes: {{s.mean(team.a_switch_cubes).toFixed(2)}}
<br> Avg Scale Cubes: {{s.mean(team.a_scale_cubes).toFixed(2)}}
<br> Avg Vault Cubes: {{s.mean(team.a_vault_cubes).toFixed(2)}}
<br> Avg Cube Placing (1-10): {{s.mean(team.a_place_quality).toFixed(2)}}
<h5>Teleop</h5>
<hr> Avg Switch Cubes: {{s.mean(team.switch_cubes).toFixed(2)}}
<br> Avg Failed Switch Cubes: {{s.mean(team.switch_cubes_failed).toFixed(2)}}
<br> Avg Scale Cubes: {{s.mean(team.scale_cubes).toFixed(2)}}
<br> Avg Failed Scale Cubes: {{s.mean(team.scale_cubes_failed).toFixed(2)}}
<br> Avg Vault Cubes: {{s.mean(team.vault_cubes).toFixed(2)}}
<br> Avg Def Cubes: {{s.mean(team.def_cubes).toFixed(2)}}
<br> Was Defensive: [<span v-for="(item, i) in team.defensive" :class="{ g: item=='true', r: item!='true' }">{{team.match[i]}}, </span>]
<h5>Endgame</h5>
<hr> Hung: [<span v-for="(item, i) in team.hang" :class="{ g: item=='success', r: item!='success' }">{{team.match[i]}}, </span>]
<h5>Misc</h5>
<hr> No Fouls: [<span v-for="(item, i) in team.foul_number" :class="{ g: item==0, r: item!=0 }">{{team.match[i]}}, </span>]
<br> Avg Fouls: {{s.mean(team.foul_number).toFixed(2)}}
<br> Driver Quality: {{s.mode(team.driver)}}
<br> Ranking Score: {{team.rankScore}}
</div>
</div>
</div>
</div>
</body>
<script src="analysis.js"></script>
<template id="match">
<span>
[<span v-for="m in _.sortBy(d, ['match'])">
<b v-bind:class="m.c">{{m.match}}</b>,
</span>]
</span>
</template>
</html>