-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
executable file
·411 lines (365 loc) · 19.5 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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<!--
Copyright 2015 University of Aveiro
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Living Globe v2.0.0
Authors: Eduardo Duarte ([email protected]) and Pedro Bordonhos ([email protected])
-->
<!doctype html>
<html lang="en">
<head>
<title>Living Globe</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<!-- Custom forms -->
<link href='https://fonts.googleapis.com/css?family=Raleway:500' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:600' rel='stylesheet' type='text/css'>
<!-- Lib stylesheets -->
<link rel="stylesheet" href="css/lib/bootstrap.css" type="text/css">
<link rel="stylesheet" href="css/lib/bootstrap-responsive.css" type="text/css">
<!--<link rel="stylesheet" href="css/lib/bootstrap-slider.min.css" type="text/css">-->
<!--<link rel="stylesheet" href="css/lib/jquery-ui.min.css" type="text/css">-->
<link rel="stylesheet" href="css/lib/nouislider.min.css" type="text/css">
<!--<link rel="stylesheet" href="css/lib/nouislider.pips.css" type="text/css">-->
<!--<link rel="stylesheet" href="css/lib/nouislider.tooltips.css" type="text/css">-->
<link rel="stylesheet" href="css/lib/bootstrap-colorpicker.min.css" type="text/css">
<link rel="stylesheet" href="css/lib/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="css/lib/nv.d3.min.css" type="text/css">
<!-- Custom stylesheets -->
<link rel="stylesheet" href="css/loading-ring.css" type="text/css">
<link rel="stylesheet" href="css/base-dark.css" type="text/css">
</head>
<body>
<div id="worldIntercept">
<div id="detailsContainer" class="details-light" hidden></div>
<div id="search" hidden>
<form onSubmit="return false;" class="navbar-search pull-left">
<input id="searchField" type="text" class="search-query" autofocus="true" placeholder="Search">
</form>
</div>
<div id="parameters" class="parameter" hidden>
<div class="container" style="width: auto;">
<div class="row-fluid" style="height: 85px;">
<div class="span6">
<h5>Bar Height</h5>
<div id="dropdownIndicator1Container" class="dropdown" style="z-index: 6;">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="dropdownIndicatorText">None</span>
<span class="caret"></span></button>
<ul id="dropdownIndicator1" class="dropdown-menu"></ul>
</div>
</div>
<div class="span1" style="width: 50px; margin-top: 22px; text-align: center; position: relative;">
<!--<a id="sliderIndicator1-min-color-picker"-->
<!--class="btn color-picker"-->
<!--style="width: 6px; height: auto; z-index: -5">-->
<!-- -->
<!--</a>-->
</div>
<div class="span4" style="margin-top: 30px; text-align: center; position: relative;">
<div id="sliderIndicator1" class="sliderIndicator" style="width:130px; height: 17px; margin: 0; position: relative;"></div>
</div>
<div class="span1" style="width: 50px; ; margin-top: 22px; text-align: center; position: relative;">
<!--<a id="sliderIndicator1-max-color-picker"-->
<!--class="btn color-picker"-->
<!--style="width: 6px; height: auto; z-index: -5">-->
<!-- -->
<!--</a>-->
</div>
</div>
<div class="row-fluid" style="height: 85px;">
<div class="span6">
<h5>Bar Color</h5>
<div id="dropdownIndicator2Container" class="dropdown" style="z-index: 5;">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="dropdownIndicatorText">None</span>
<span class="caret"></span></button>
<ul id="dropdownIndicator2" class="dropdown-menu"></ul>
</div>
</div>
<div class="span1" style="width: 50px; margin-top: 22px; text-align: center; position: relative;">
<a id="sliderIndicator2-min-color-picker"
class="btn color-picker"
style="width: 6px; height: auto; z-index: -5">
</a>
</div>
<div class="span4" style="margin-top: 30px; text-align: center; position: relative;">
<div id="sliderIndicator2" class="sliderIndicator" style="width:130px; height: 17px; margin: 0; position: relative;"></div>
</div>
<div class="span1" style="width: 50px; ; margin-top: 22px; text-align: center; position: relative;">
<a id="sliderIndicator2-max-color-picker"
class="btn color-picker"
style="width: 6px; height: auto; z-index: -5">
</a>
</div>
</div>
<div class="row-fluid" style="height: 85px;">
<div class="span6">
<h5>Country Color</h5>
<div id="dropdownIndicator3Container" class="dropdown" style="z-index: 4;">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="dropdownIndicatorText">None</span>
<span class="caret"></span></button>
<ul id="dropdownIndicator3" class="dropdown-menu"></ul>
</div>
</div>
<div class="span1" style="width: 50px; margin-top: 22px; text-align: center; position: relative;">
<a id="sliderIndicator3-min-color-picker"
class="btn color-picker"
style="width: 6px; height: auto; z-index: -5">
</a>
</div>
<div class="span4" style="margin-top: 30px; text-align: center; position: relative;">
<div id="sliderIndicator3" class="sliderIndicator" style="width:130px; height: 17px; margin: 0; position: relative;"></div>
</div>
<div class="span1" style="width: 50px; ; margin-top: 22px; text-align: center; position: relative;">
<a id="sliderIndicator3-max-color-picker"
class="btn color-picker"
style="width: 6px; height: auto; z-index: -5">
</a>
</div>
</div>
<div id="boxPlotContainer" hidden>
<table>
<tr>
<td style="width: 33%">
<div id="chart1" class="chart">
<svg></svg>
<div id="indicator1Name" style="font-size: 12px; height: 30px; color: #aaa; text-align: center">aa</div>
</div>
</td>
<td style="width: 33%">
<div id="chart2" class="chart">
<svg></svg>
<div id="indicator2Name" style="font-size: 12px; height: 30px; color: #aaa; text-align: center"></div>
</div>
</td>
<td style="width: 33%">
<div id="chart3" class="chart">
<svg></svg>
<div id="indicator3Name" style="font-size: 12px; height: 30px; color: #aaa; text-align: center"></div>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="timelineContainer" hidden>
<div id="timeline" class="timeline"></div>
</div>
<div id="infoButtonContainer" style="z-index: 10;">
<a href="#" data-toggle="modal" data-target="#config-modal" style="margin: 5px"><i class="fa fa-cog fa-2x"></i></a>
<a href="#" data-toggle="modal" data-target="#info-modal" style="margin: 5px"><i class="fa fa-info-circle fa-2x"></i></a>
</div>
<div id="loadingContainer" hidden>
<div id="loading"><div></div></div>
</div>
<div id="worldContainer"></div>
</div>
<div class="modal fade" id="config-modal" data-width="1000" tabindex="-1" role="dialog" aria-labelledby="config-modal" aria-hidden>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2 class="form-signin-heading">Settings</h2>
</div>
<div class="modal-body">
<div class="row-fluid" style="margin-top: -30px">
<div class="span9">
<table>
<tr>
<td>
<div class="customCheckbox">
<input type="checkbox" value="" id="showBoxPlotsCheckbox" onchange="onShowBoxPlotsCheckboxChange()" name="check" />
<label for="showBoxPlotsCheckbox"></label>
</div>
</td>
<td width="7px"></td>
<td>
<div id="showBoxPlotsLabel" class="customCheckboxLabel" onclick="onShowBoxPlotsLabelClick()">
Display box plots
</div>
</td>
</tr>
<tr>
<td>
<div class="customCheckbox">
<input type="checkbox" value="" id="anchorCountryDetailsToMouseCheckbox" onchange="onAnchorCountryDetailsToMouseCheckboxChange()" name="check" />
<label for="anchorCountryDetailsToMouseCheckbox"></label>
</div>
</td>
<td width="7px"></td>
<td>
<div id="anchorCountryDetailsToMouseLabel" class="customCheckboxLabel" onclick="onAnchorCountryDetailsToMouseLabelClick()">
Show country details as a tooltip
</div>
</td>
</tr>
<tr>
<td>
<div class="customCheckbox">
<input type="checkbox" value="" id="keepBoundsCheckbox" onchange="onKeepBoundsCheckboxChange()" name="check" />
<label for="keepBoundsCheckbox"></label>
</div>
</td>
<td width="7px"></td>
<td>
<div id="keepBoundsLabel" class="customCheckboxLabel" onclick="onKeepBoundsLabelClick()">
Keep configured bounds when changing the year
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="info-modal" data-width="1000" tabindex="-1" role="dialog" aria-labelledby="info-modal" aria-hidden>
<div class="modal-dialog">
<div class="modal-content">
<!--<div class="modal-header">-->
<!--<h2 class="form-signin-heading">More Info</h2>-->
<!--</div>-->
<div class="modal-body">
<h3>More Info</h3>
<p style="font-weight: 500;">
Press the data types on the left panel to map another demographic indicator to the corresponding visual structure.
</p>
<p style="font-weight: 500;">
Drag the slider handles on the left panel to limit the presented data according to new minimum and maximum values.
</p>
<p>
Press the button <b>left</b> of the bar color or country color slider to pick a color for the <b>lower values</b>.
</p>
<p>
Press the button <b>right</b> of the bar color or country color slider to pick a color for the <b>higher values</b>.
</p>
<br/>
<p style="font-weight: 500;">
Drag the slider below to change the year of collected data.
</p>
<p style="font-weight: 500;">
Place the mouse over a country on the globe to show detailed data for that country.
</p>
<br/>
<h3>License</h3>
<p>
Living Globe (v3.0.0) was developed by Eduardo Duarte
(<a href="mailto:[email protected]">[email protected]</a>)
and Pedro Bordonhos
(<a href="mailto:[email protected]">[email protected]</a>)
, under the supervision of Paulo Dias
(<a href="mailto:[email protected]">[email protected]</a>)
and Beatriz Sousa Santos
(<a href="mailto:[email protected]">[email protected]</a>).
</p>
<p>
The source code for this project is available at <a href="https://github.com/edduarte/living-globe">https://github.com/edduarte/living-globe</a>.
</p>
<br/>
Copyright 2015 University of Aveiro<br/>
<br/>
Licensed under the Apache License, Version 2.0 (the "License");<br/>
you may not use this file except in compliance with the License.<br/>
You may obtain a copy of the License at<br/>
<br/>
http://www.apache.org/licenses/LICENSE-2.0<br/>
<br/>
Unless required by applicable law or agreed to in writing, software<br/>
distributed under the License is distributed on an "AS IS" BASIS,<br/>
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br/>
See the License for the specific language governing permissions and<br/>
limitations under the License.<br/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
<!-- Lib scripts -->
<script type="text/javascript" src="js/lib/Three62.js"></script>
<script type="text/javascript" src="js/lib/OrbitControls.js"></script>
<script type="text/javascript" src="js/lib/TrackballControls.js"></script>
<script type="text/javascript" src="js/OrbitTrackballControls.js"></script>
<script type="text/javascript" src="js/lib/THREEx.FullScreen.js"></script>
<script type="text/javascript" src="js/lib/THREEx.WindowResize.js"></script>
<script type="text/javascript" src="js/lib/detector.js"></script>
<script type="text/javascript" src="js/lib/jquery-1.11.2.min.js"></script>
<!--<script type="text/javascript" src="js/lib/jquery-ui.min.js"></script>-->
<script type="text/javascript" src="js/lib/jquery.autocomplete.js"></script>
<!--<script type="text/javascript" src="js/lib/jquery.csv-0.71.min.js"></script>-->
<script type="text/javascript" src="js/lib/wNumb.js"></script>
<script type="text/javascript" src="js/lib/nouislider.min.js"></script>
<script type="text/javascript" src="js/lib/d3.v3.min.js"></script>
<script type="text/javascript" src="js/lib/nv.d3.js"></script>
<script type="text/javascript" src="js/lib/stats.js"></script>
<script type="text/javascript" src="js/lib/numeral.min.js"></script>
<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="js/lib/bootstrap-slider.min.js"></script>
<script type="text/javascript" src="js/lib/bootstrap-colorpicker.min.js"></script>
<script type="text/javascript" src="js/lib/chroma.min.js"></script>
<script type="text/javascript" src="js/lib/utils.js"></script>
<script type="text/javascript" src="js/lib/postprocessing/EffectComposer.js"></script>
<script type="text/javascript" src="js/lib/postprocessing/RenderPass.js"></script>
<script type="text/javascript" src="js/lib/postprocessing/ShaderPass.js"></script>
<script type="text/javascript" src="js/lib/postprocessing/MaskPass.js"></script>
<script type="text/javascript" src="js/lib/shaders/FXAAShader.js"></script>
<script type="text/javascript" src="js/lib/shaders/AdditiveBlendShader.js"></script>
<script type="text/javascript" src="js/lib/shaders/CopyShader.js"></script>
<script id="globeVertexShader" type="x-shader/x-vertex">
varying vec3 vNormal;
varying vec2 vUv;
void main()
{
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0);
vNormal = normalize( normalMatrix * normal );
vUv = uv;
}
</script>
<script id="globeFragmentShader" type="x-shader/x-fragment">
uniform sampler2D mapIndex;
uniform sampler2D ratio;
uniform sampler2D select;
uniform sampler2D outline;
uniform sampler2D blendImage;
varying vec3 vNormal;
varying vec2 vUv;
void main() {
vec4 mapColor = texture2D( mapIndex, vUv );
float indexedColor = mapColor.y;
vec2 ratioUV = vec2( indexedColor, 0.0 );
vec4 ratioColor = texture2D( ratio, ratioUV );
vec2 selectUV = vec2( indexedColor, 0.0 );
vec4 selectColor = texture2D( select, selectUV );
vec4 outlineColor = texture2D( outline, vUv );
vec4 blendColor = texture2D( blendImage, vUv );
// if (outlineColor.x > 0.1) outlineColor = vec4(1.0,1.0,1.0,1.0);
gl_FragColor = 0.5 * outlineColor + 1.0 * ratioColor + 1.0 * selectColor + 0.5 * blendColor;
}
</script>
<!-- Custom scripts -->
<script type="text/javascript" src="js/base.js"></script>
</body>
</html>