-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
333 lines (298 loc) · 13.1 KB
/
index.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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Kosovo Data Visualization</title>
<script type="text/javascript" src="lib/d3.js"></script>
<script type="text/javascript" src="lib/d3.geo.js"></script>
<script type="text/javascript" src="lib/d3.geom.js"></script>
<script type="text/javascript" src="lib/jquery-1.7.1.js"></script>
<script type="text/javascript" src="lib/jquery-ui-1.8.17.min.js"></script>
<script type="text/javascript" src="lib/bootstrap-alert.js"></script>
<script type="text/javascript" src="lib/bootstrap-button.js"></script>
<script type="text/javascript" src="lib/bootstrap-tooltip.js"></script>
<link rel="stylesheet" href="resources/css/bootstrap.css" type="text/css" >
<link rel="stylesheet" href="resources/css/colorbrewer.css" type="text/css" />
<link rel="stylesheet" href="resources/css/jquery-ui-1.8.17.css" type="text/css" />
<link rel="icon" href="../../imgs/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="kosovoStats.css" type="text/css" />
<script type="text/javascript" src="kosovoStats.js"></script>
</head>
<body>
<div class="navbar" id="navigation">
<div class="navbar-inner">
<div class="container-fluid">
<a class="brand" href="#">Kosovo Data Visualization</a>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2" align="center">
<div class="row">
<form>
<fieldset>
<!-- I feel bad about this hack. Chrome won't do a file dialog
unless it's visible, so I need to make it "hidden" without
actually hiding it :( -->
<div class="clearfix">
<input id="dummy-file" type="file" style="position: absolute; top: -50px; z-index: -1" accept="application/json" />
</div>
<div class="clearfix">
<div class="language">
<select id="selectMe" >
<option value="1" selected="selected">Albanian</option>
<option value="2">English</option>
<option value="3">Serbian</option>
</select></div>
<div class="clearfix">
<p class="help-block">Choose your category</p>
<select id="data-select" disabled="true">
<option id="1" value="data/d1.json,Reds">Te dhenat mbi cenueshmerine social per komuna</option>
<option id="2" value="data/d2.json,Purples">Rreziqet dhe cenueshmerit gjate Ciklit te Jetes: femijet</option>
<option id="3" value="data/d3.json,Oranges">Te dhenat mbi cenueshmerine sociale per komuna</option>
<option id="4" value="data/d4.json,Greens">Standardet e uleta te jeteses dhe mungesat ekonomike</option>
<option id="5" value="data/d5.json,Blues">Pa siguria e te ardhurave</option>
<option id="6" value="data/d6.json,Greys">Cenueshmeri tjera dhe rreziqe te perjashtimit shoqeror</option>
</select> </div>
</div>
<div class="clearfix">
<button id="load-button" class="btn btn-primary" type="button" disabled="true">Load</button>
</div>
</fieldset>
</form>
</div>
<div class="row" style="padding: 10px">
<form>
<fieldset>
<div class="clearfix">
<p class="help-block">choose your domain</p>
<div id="feature-types"></div>
</div>
<div class="clearfix" style="display:none;">
<p class="help-block">Quantization Scale</p>
<select id="quantize-types">
<option value="quantile">Quantile</option>
<option value="linear">Linear</option>
<option value="log">Logarithmic</option>
<option value="pow">Square Root</option>
</select>
</div>
<!-- <div class="clearfix">
<p class="help-block">Buckets: <span id="choropleth-count">9</span></p>
<div id="slider"></div>
</div> -->
<div class="clearfix">
<div id="legend" class="group">
<ul>
<li><div class="button24"></div> 0.8 - 1.0</li>
<li><div class="button23"></div> 0.6 - 0.8</li>
<li><div class="button22"></div> 0.4 - 0.6</li>
<li><div class="button21"></div> 0.2 - 0.4</li>
<li><div class="button20"></div> 0.2</li>
<li><div class="button19"></div> 0</li>
</ul>
</div>
<div id="legend2" class="group2">
<ul>
<li><div class="button30"></div> 0.8 - 1.0</li>
<li><div class="button29"></div> 0.6 - 0.8</li>
<li><div class="button28"></div> 0.4 - 0.6</li>
<li><div class="button27"></div> 0.2 - 0.4</li>
<li><div class="button26"></div> 0.2</li>
<li><div class="button25"></div> 0</li>
</ul>
</div>
<div id="legend3" class="group3">
<ul>
<li><div class="button18"></div> 0.8 - 1.0</li>
<li><div class="button17"></div> 0.6 - 0.8</li>
<li><div class="button16"></div> 0.4 - 0.6</li>
<li><div class="button15"></div> 0.2 - 0.4</li>
<li><div class="button14"></div> 0.2</li>
<li><div class="button13"></div> 0</li>
</ul>
</div>
<div id="legend4" class="group4">
<ul>
<li><div class="button12"></div> 0.8 - 1.0</li>
<li><div class="button11"></div> 0.6 - 0.8</li>
<li><div class="button10"></div> 0.4 - 0.6</li>
<li><div class="button9"></div> 0.2 - 0.4</li>
<li><div class="button8"></div> 0.2</li>
<li><div class="button7"></div> 0</li>
</ul>
</div>
<div id="legend5" class="group5">
<ul>
<li><div class="button6"></div> 0.8 - 1.0</li>
<li><div class="button5"></div> 0.6 - 0.8</li>
<li><div class="button4"></div> 0.4 - 0.6</li>
<li><div class="button3"></div> 0.2 - 0.4</li>
<li><div class="button2"></div> 0.2</li>
<li><div class="button1"></div> 0</li>
</ul>
</div>
<div id="legend6" class="group6">
<ul>
<li><div class="button36"></div> 0.8 - 1.0</li>
<li><div class="button35"></div> 0.6 - 0.8</li>
<li><div class="button34"></div> 0.4 - 0.6</li>
<li><div class="button33"></div> 0.2 - 0.4</li>
<li><div class="button32"></div> 0.2</li>
<li><div class="button31"></div> 0</li>
</ul>
</div>
</div>
</fieldset>
</form>
</div>
</div>
<div class="span10">
<div class="row-fluid" id="chart"></div>
<div class="row-fluid" id="controls">
<div class="pull-right">
<button id="reset-button" class="btn btn-primary" type="button">Reset Zoom and Pan</button>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$('#selectMe').change(function(){
var value = $(this).val();
if (value == 1)
{
$('#data-select option').each(function() {
switch ($(this).attr('id'))
{
case '1': this.text = "Te dhenat mbi cenueshmerine social per komuna";
break;
case '2': this.text = "Rreziqet dhe cenueshmerit gjate Ciklit te Jetes: femijet";
break;
case '3': this.text = "Te dhenat mbi cenueshmerine sociale per komuna";
break;
case '4': this.text = "Standardet e uleta te jeteses dhe mungesat ekonomike";
break;
case '5': this.text = "Pa siguria e te ardhurave";
break;
case '6': this.text = "Cenueshmeri tjera dhe rreziqe te perjashtimit shoqeror";
break;
default: this.text = ("Unknown grade<br />")
}
});
}
if (value == 2)
{
$('#data-select option').each(function() {
this.text = "english";
switch ($(this).attr('id'))
{
case '1': this.text = "Social risks and vulnerabilities";
break;
case '2': this.text = "Life-cycle risks and vulnerabilities: children";
break;
case '3': this.text = "Social risks and vulnerabilities: elderly";
break;
case '4': this.text = "Low living standards and economic deprivation";
break;
case '5': this.text = "Income Insecurity";
break;
case '6': this.text = "Other vulnerabilities and risks of social exclusion";
break;
default: this.text = ("Unknown grade<br />")
}
// alert($(this).text());
});
}
if (value == 3)
{
$('#data-select option').each(function() {
this.text = "serbian";
switch ($(this).attr('id'))
{
case '1': this.text = "Ugrozenost i rizici od socijalnog iskljucenja";
break;
case '2': this.text = "Rizici i ugrozenost zivotnog ciklusa: deca";
break;
case '3': this.text = "Rizici i ugrozenost zivotnog ciklusa: starija lica";
break;
case '4': this.text = "Niski zivotni standardi i ekonomsko uskracivanje";
break;
case '5': this.text = "Nesigurni prihod";
break;
case '6': this.text = "Ostala ugrozenost i rizici od socijalnog iskljucenja";
break;
default: this.text = ("Unknown grade<br />")
}
});
}
});
$(document).ready(function() {
$('.group').hide();
$('.group2').hide();
$('.group3').hide();
$('.group4').hide();
$('.group6').hide();
$('.group5').hide();
$('#load-button').click(function(){
var id = $('#data-select').find(':selected').attr('id');
if(id==1)
{
$('.group2').hide();
$('.group3').hide();
$('.group4').hide();
$('.group5').hide();
$('.group6').hide();
$('.group').show();
}
if(id==2)
{
$('.group').hide();
$('.group3').hide();
$('.group4').hide();
$('.group5').hide();
$('.group6').hide();
$('.group2').show();
}
if(id==3)
{
$('.group').hide();
$('.group2').hide();
$('.group4').hide();
$('.group5').hide();
$('.group6').hide();
$('.group3').show();
}
if(id==4)
{
$('.group').hide();
$('.group2').hide();
$('.group3').hide();
$('.group5').hide();
$('.group6').hide();
$('.group4').show();
}
if(id==5)
{
$('.group').hide();
$('.group2').hide();
$('.group3').hide();
$('.group4').hide();
$('.group6').hide();
$('.group5').show();
}
if(id==6)
{
$('.group').hide();
$('.group2').hide();
$('.group3').hide();
$('.group4').hide();
$('.group5').hide();
$('.group6').show();
}
})
});
</script>
</body>
</html>