-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbangladesh.html
235 lines (223 loc) · 8.25 KB
/
bangladesh.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
<!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 project</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.html">Overall scores</a>
</li>
<li class="nav-item">
<a class="nav-link" href="ethipia.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 scores</a>
</li>
<li class="nav-item">
<a class="nav-link" href="planetdiet.html">Enhancing diets and planet scores</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link" href="frequency.html">Frequency graph</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">
Mozambique 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>
In this densely populated urban area in Bangladesh a rapid increase of highly processed foods contribute to alarming trends in obesity (> 50% increase) and diabetes (>20% increase) over the last decade. Extreme weather events such as flooding coupled with increasing unpredictability of rainfall are making food supply and food prices unstable. High levels of pollution and high GHG emissions also present significant environmental challenges in this context.
</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_ban.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="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 = ['2.000000','2.815000','2.415000','0.685000','0.500000','45.535000']
console.log(row)
if (value < median[0]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleN(value, row, index) {
var median = ['2.000000','2.815000','2.415000','0.685000','0.500000','45.535000']
console.log(row)
if (value < median[1]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleP(value, row, index) {
var median = ['2.000000','2.815000','2.415000','0.685000','0.500000','45.535000']
console.log(row)
if (value < median[2]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleL(value, row, index) {
var median = ['2.000000','2.815000','2.415000','0.685000','0.500000','45.535000']
console.log(row)
if (value < median[3]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleE(value, row, index) {
var median = ['2.000000','2.815000','2.415000','0.685000','0.500000','45.535000']
console.log(row)
if (value < median[4]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
function cellStyleO(value, row, index) {
var median = ['2.000000','2.815000','2.415000','0.685000','0.500000','45.535000']
console.log(row)
if (value < median[5]) {
return {
css: {
"color": 'red'
}
}
}
return {
css: {
color: 'black'
}
}
}
</script>
</body>
</html>