-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverall.html
241 lines (226 loc) · 8.96 KB
/
overall.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Disrupt</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/bootstrap-table.min.css">
<!-- <style type="text/css">
table {
top: 10%;
left: 10%;
right: 10%;
}
</style> -->
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<ul class="nav">
<li class="nav-item">
<a class="nav-link active" href="home.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Overall scores</a>
</li>
<li class="nav-item">
<a class="nav-link" href="ethiopia.html">Ethiopia scores</a>
</li>
<li class="nav-item">
<a class="nav-link" href="mozambique.html">Mozambique scores</a>
</li>
<li class="nav-item">
<a class="nav-link" href="bangladesh.html">Bangladesh scores</a>
</li>
<li class="nav-item">
<a class="nav-link" href="planetdiet.html">Enhancing diets and planet scores</a>
</li>
</ul>
</div>
</div>
<div id="logo" class="row mt-2">
<div class="col" align="center">
<a href="home.html">
<img border="0" src="images/ProjectDisrupt_logos.png" width="400px" height="auto">
</a>
</div>
</div>
<div class="row mt-4">
<div class="col-md-12">
<h3 align="center">
Overall scores
</h3>
</div>
</div>
<div class="row mt-3 justify-content-md-center" >
<div class="col col-lg-2 col-md-auto"/>
</div>
<div class="col">
<p>The 85 innovations were scored against 4 types of criteria: 1) dietary health, 2) planet health, 3) equity (potential to reduce inequalities), and 4) leapfrogging potential. Innovations may be explored by sorting based on their respective frequency of selection or by each of the 4 criteria types. </p>
<u>How scores were calculated: </u>
<p>For each of the 14 criterion five possible scores could be assigned by each panelist: high potential (+1), moderate potential (+0,5), low or no potential (0), potential negative impact (-1), and don’t know (0). Then, a single criteria score was calculated for each of the 4 criteria “types”: </p>
<li>Dietary health [-5;5] = Food quality + Food safety + Affordability + Availability + Desirability</li>
<li>Planetary health [-7;7] = Mitigation + Adaptation + Water + Soil + Biodiversity loss + Increasing Biodiversity + Pollution</li>
<li>Equity [-1;1]</li>
<li>Leapfrogging [-1;1]</li><p></p>
<p>Finally an overall score was calculated as the sum of the scores for Dietary health [25;0] + Planetary health [25;0] + Leapfrogging [25;0] + frequency of selection [25;0].</p>
<p><span style="color: #ff0000">Red scores</span> indicate that the score is under median value for a given criteria</p>
</div>
<div class="col col-lg-2 col-md-auto">
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table
data-toggle="table"
data-search="true"
data-custom-search="customSearch"
data-filter-control="true"
data-show-search-clear-button="true"
data-show-columns="true"
data-url="js/data_all.json">
<thead>
<tr>
<th data-sortable="true" data-field="Innovation" data-formatter="LinkFormatter">Innovation</th>
<th data-sortable="true" data-field="Cluster" data-filter-control="select">Cluster</th>
<th data-sortable="true" data-field="freq" data-cell-style="cellStyleF">Frequency</th>
<th data-sortable="true" data-field="Number Context" data-visible="false">Contexts</th>
<th data-sortable="true" data-field="Nutrition_total" data-cell-style="cellStyleN">Nutrition score</th>
<th data-sortable="true" data-field="Planet_total" data-cell-style="cellStyleP">Planet score</th>
<th data-sortable="true" data-field="LEAPFROGGING" data-cell-style="cellStyleL">Leapfrogging score</th>
<th data-sortable="true" data-field="EQUITY" data-cell-style="cellStyleE">Equity score</th>
<th data-sortable="true" data-field="score_9" data-cell-style="cellStyleO">Overall score</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]/dist/bootstrap-table.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/extensions/filter-control/bootstrap-table-filter-control.min.js"></script>
<script>
$(function() {
$('#table').bootstrapTable({
formatSearch: function () {
return 'Search Innovations'
}
})
})
function customSearch(data, text) {
return data.filter(function (row) {
return row.Innovation.indexOf(text) > -1
})
}
function LinkFormatter(value, row, index) {
return "<a href='innovation.html?a="+row.Innovation+"'>"+value+"</a>";
}
</script>
<script>
function cellStyleF(value, row, index) {
var median = ['5.000000','2.000000','3.00000','3.120000','0.670000','0.620000','49.120000']
console.log(row)
if (value < median[0]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleN(value, row, index) {
var median = ['5.000000','2.000000','3.00000','3.120000','0.670000','0.620000','49.120000']
console.log(row)
if (value < median[2]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleP(value, row, index) {
var median = ['5.000000','2.000000','3.00000','3.120000','0.670000','0.620000','49.120000']
console.log(row)
if (value < median[3]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleL(value, row, index) {
var median = ['5.000000','2.000000','3.00000','3.120000','0.670000','0.620000','49.120000']
console.log(row)
if (value < median[4]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleE(value, row, index) {
var median = ['5.000000','2.000000','3.00000','3.120000','0.670000','0.620000','49.120000']
console.log(row)
if (value < median[5]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleO(value, row, index) {
var median = ['5.000000','2.000000','3.00000','3.120000','0.670000','0.620000','49.120000']
console.log(row)
if (value < median[6]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
</script>
</body>
</html>