-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
executable file
·538 lines (444 loc) · 22.3 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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>UNHCR Historical Refugee Data</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="title" content="UNHCR Interactive Historical Refugee Data">
<meta name="description" content="Explore UNHCR's historical refugee data with this interactive data visualization">
<meta name="author" content="The UN Refugee Agency (FICSS)">
<link rel="shortcut icon" href="http://www.unhcr.org/favicon.ico" />
<!-- Le styles -->
<link href="js/jvectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,400i,700,900" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/dataviz-styleguide/semantic/dist/semantic.min.css?cache=009g">
<link rel="stylesheet/less" type="text/css" href="css/style.less?cache=009g" />
<script src="js/jquery.js"></script>
<script src="https://unpkg.com/dataviz-styleguide/semantic/dist/semantic.min.js?cache=009g"></script> <!-- bootstrap.js -->
<script type="text/javascript" charset="utf-8" src="js/d3.v3.min.js"></script>
<script src="js/topojson.js"></script>
<script src="js/colorbrewer.js"></script>
<script src="js/d3.geo.projection.min.js"></script>
<script src="data.js?cache=009g"></script>
<script src="js/less.js"></script>
<!-- Start of Facebook Meta Tags -->
<meta property="og:title" content="UNHCR Historical Refugee Data"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="http://unhcr.github.io/dataviz-population-change/">
<meta property="og:image" content="https://user-images.githubusercontent.com/68416/30267667-ea6dd1dc-9700-11e7-8b21-3cb3ad8c5822.png"/>
<meta property="og:site_name" content="Historical Refugee Data"/>
<meta property="og:description" content="Explore the UNHCR statistical data with this visualization"/>
<!-- End of Facebook Meta Tags -->
<!--[if IE 7]>
<script type="text/javascript">
window.location = "notsupported.html";
</script>
<![endif]-->
<!--[if IE 8]>
<script type="text/javascript">
window.location = "notsupported.html";
</script>
<![endif]-->
<!--[if lte IE 7]>
<script type="text/javascript">
window.location = "notsupported.html";
</script>
<![endif]-->
<!--[if lte IE 8]>
<script type="text/javascript">
window.location = "notsupported.html";
</script>
<![endif]-->
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="bootstrap/js/html5shiv.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="bootstrap/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="bootstrap/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="bootstrap/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="bootstrap/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="bootstrap/ico/favicon.png">
</head>
<body>
<div id="container">
<br/>
<div class="ui grid unhcr-header unhcr-header-style3">
<img class="unhcr-header-logo" src="images/unhcr-logo-horizontal.svg">
<div class="unhcr-header-title">
<h1>Dataviz</h1>
<h2>Population Change</h2>
<h3>Evolution of refugee populations overtime showing increases and decreases from year to year</h3>
</div>
<div class="unhcr-header-social">
<a href="https://github.com/unhcr/dataviz-population-change" target="_blank" title="View Source Code on GitHub"><i class="github square icon"></i></a>
<!-- Links generated with http://www.sharelinkgenerator.com/ -->
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A//unhcr.github.io/dataviz-population-change/" target="_blank" title="Share on Facebook"><i class="facebook square icon"></i></a>
<a href="https://twitter.com/home?status=Check%20out%20this%20neat%20%23dataviz%20by%20%40Refugees%20http%3A//unhcr.github.io/dataviz-population-change/" target="_blank" title="Share on Twitter"><i class="twitter square icon"></i></a>
</div>
</div>
<div id="mobilemessage" class="ui warning message">
<i class="icon tv"></i>
This visualisation is best viewed on desktop.
</div>
<div id="topRow" class="ui grid stackable">
<div id="totalPopBox" class="four wide column">
<div class="figure_label">
<div class="label_main1">
Refugee Population
</div>
</div>
<div class="figure_box">
<div class="figure_text text" id="totalValue" style="font-size: 22px; padding-top: 1px; line-height: 160%; color: #465F7F;"></div>
</div>
</div>
<div id="popIncreasesBox" class="four wide column">
<div class="figure_label">
<div class="label_main2" style="">
Population Increases
</div>
<div class="text" style="font-size: 9px; white-space: nowrap">
Compared to previous year
</div>
</div>
<div class="figure_box">
<div class="figure_text text" id="increaseValue" style="padding-left: 10px; color: #EF4A60"></div>
<div style="position: relative; top: -22px; left: 8px;" class="changeUp"></div>
</div>
</div>
<div id="popDecreasesBox" class="five wide column">
<div class="figure_label">
<div class="label_main2" style=" ">
Population Decreases
</div>
<div class="text" style="font-size: 9px; white-space: nowrap">
Compared to previous year
</div>
</div>
<div class="figure_box">
<div class="figure_text text" id="decreaseValue" style="padding-left: 10px; color: #338EC9"></div>
<div style="position: relative; top: -30px; left: 8px;" class="changeDown"></div>
</div>
</div>
<div id="yearSelectorBox" class="three wide column ">
<div class="figure_label">
<div class="label_main1">
Year
</div>
</div>
<div class="figure_box" style="width: 100px;">
<div class="prev" id="yearDown" onclick="yearDown();"> </div>
<div class="figure_text text" id="yearBox" style="color: #000">2016</div>
<div class="next" id="yearUp" onclick="yearUp();"> </div>
</div>
</div>
</div>
<h4 class="ui blue header">Refugee Population by Year</h4>
<div class="text changeGraphSubTitle" style="font-size: 10px;">Click on the graphs to select a year.</div>
<div class="totalGraphDiv"></div>
<h4 class="ui blue header">Refugee Population Change</h4>
<div class="text changeGraphSubTitle" style="font-size: 10px">Compared to previous year.</div>
<div class="changeGraphDiv">
<div class="changeSmallUp" style="position: absolute; top: 10px; left: 10px;"> </div>
<span class="axisLabel inc">Increase</span>
<span class="axisLabel dec">Decrease</span>
<div class="changeSmallDown" style="position: absolute; bottom: 20px; left: 10px;"> </div>
</div>
<div class="middleRow ui grid stackable">
<div id="switchContainer" class="eight wide column">
<table>
<tr>
<td style="padding-left: 0px;">
<div id="switchASY" class="switchActive" selected="selected" style="display: inline; padding-right: 10px; font-size: 11px;">
Country of Asylum
</div>
</td>
<td style="padding-left: 0px;">
<div class="ui toggle checkbox">
<input type="checkbox" name="public" id="switch" class="switchASY" onclick="switchChange();">
<label></label>
</div>
</td>
<td style="padding-left: 10px;">
<div id="switchORI" class="switchInactive" style="display: inline; padding-right: 10px; font-size: 11px">
Country of Origin
</div>
</td>
</tr>
</table>
</div>
<div id="countrySelector" class="eight wide column">
<div class="figure_label">
<div class="label_main1">
Selected Country
</div>
</div>
<div id="countrySelectorMobile">
<div id="countrySelectorMobileIcon"></div>
<div id="prev"></div>
<div id="next"></div>
</div>
<!-- <div class="figure_box" style="width: 280px;">
<span class="figure_text text" id="countryBox" style="color: #424242">World</span>
</div> -->
</div>
</div>
<!-- MAP SECTION -->
<div class="map_header">
<h4 class="ui blue header">World Map</h4>
<div class="text changeGraphSubTitle" style="font-size: 10px;">Click on a country to select and filter graphs.</div>
</div>
<div id="map">
<div id="map_tooltip" class='dc-tooltip'><span class='dc-tooltip-title'>" + monthNameFormat(date) + "</span> | <span class='dc-tooltip-value'>" + numberFormat(d.y) +"</span></div>
<!-- legend -->
<div id="totalORIkey" class="maplegend">
<table cellpadding="0" cellspacing="2" style="border: none" class="axisLabel" >
<tr>
<td colspan="2" class="axisTitle" style="padding-left: 0px; font-weight: bold;"> Refugees by Origin</td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 5px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #D1D7DF;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">1 - 25,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #A3AFBF;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">25,001 - 100,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #74879F;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">100,001 - 500,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #465F7F;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">500,001 - 1,000,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #18375F;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">1,000,001 - 2,500,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #122947;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">2,500,000+ </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #d3d3d3;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; border: 0px solid black ">Data unavailable </td>
</tr>
</table>
</div>
<div id="totalASYkey" class="maplegend" style="display: none;">
<table cellpadding="0" cellspacing="2" style="border: none" class="axisLabel" >
<tr>
<td colspan="2" class="axisTitle" style="padding-left: 0px; font-weight: bold;"> Refugees by Asylum</td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 5px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #D1D7DF;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">1 - 25,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #A3AFBF;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">25,001 - 100,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #74879F;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">100,001 - 500,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #465F7F;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">500,001 - 1,000,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #18375F;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">1,000,001 - 2,500,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #122947;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">2,500,000+ </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #d3d3d3;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; border: 0px solid black ">Data unavailable </td>
</tr>
</table>
</div>
<div id="changekey" class="maplegend">
<table cellpadding="0" cellspacing="2" style="border: none" class="axisLabel">
<tr>
<td width="20px" class="changeSmallUp"></td>
<td class="axisTitle" style="padding-left: 7px; font-weight: bold;"> Increase</td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #B33848;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">500,000 + </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #EF4A60;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">100,001 - 500,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #F26E80;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">1,001 - 100,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #F592A0;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">1 - 1,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: rgba(0, 0, 0, 0.3);" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; border: 0px solid black ">Data unavailable (0)</td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #99C7E4;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">1- 1,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #66AAD7;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">1,001 - 100,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #338EC9;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">100,001 - 500,000 </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td style="border: 1px solid rgba(0, 0, 0, 0.3); background-color: #0072BC;" width="20px"></td>
<td nowrap="nowrap" style="padding-left: 8px; ">500,000 + </td>
</tr>
<tr>
<td style="border: none" width="20px"></td>
<td nowrap="nowrap" style="font-size: 3px "> </td>
</tr>
<tr>
<td width="20px" class="changeSmallDown"></td>
<td class="axisTitle" style="padding-left: 7px; font-weight: bold;"> Decrease</td>
</tr>
</table>
</div>
<!-- / legend -->
<div id="map_info">
<div class="map_info">
<div id="Country" class="map_info_title">Country</div>
<div id="mapinfo_text">
<div id="refASYTitle" class="axisTitle" style="font-size: 11px; font-weight: bold;">Refugees in Angola</div>
<span id="refASYTotal" style="font-size: 14px; font-weight: bold; color: #0072BC">122,220</span>
<span style="font-size: 10px; font-weight: normal;" class="mapInfoLabel"> refugees in-country</span><br/>
<div id="refASYChangeIcon" class="changeSmallUp"></div>
<span id="refASYChange" style="font-size: 12px; font-weight: norma;">1,202,600</span>
<span id="refASYChangeYear" style="font-size: 10px; font-weight: normal;" class="mapInfoLabel"> increase since 1989</span>
<div id="refORITitle" class="axisTitle" style="font-size: 11px; font-weight: bold;">Refugees from Angola</div>
<span id="refORITotal" class="" style="font-size: 14px; font-weight: bold;">122,220</span>
<span class="mapInfoLabel" style="font-size: 10px; font-weight: normal;"> refugees worldwide</span><br/>
<div id="refORIChangeIcon" class="changeSmallUp"></div>
<span id="refORIChange" style="font-size: 12px; font-weight: normal;">1,202,600</span>
<span id="refORIChangeYear" class="mapInfoLabel" style="font-size: 10px; font-weight: normal;"> increase since 1989</span>
</div>
</div><!-- /.map_info -->
</div><!-- /#map_info -->
</div>
<div class="text footer">
Developed by the UNHCR Dataviz Team, Field Information and Coordination Support Section (FICSS)
<a href="mailto:[email protected]?subject=data.unhcr.org/dataviz">Email FICSS</a> --
<span class="disclaimer1">DISCLAIMER -- The borders and country names on this map do not imply official endorsement by the United Nations. Data may be unavailable for some locations during certain time periods.</span>
<span class="disclaimer2">The historical country borders were adapted from CShapes - Weidmann, Nils B., Doreen Kuse, and Kristian Skrede Gleditsch. 2010. The Geography of the International System: The CShapes Dataset. International Interactions 36 (1). </span><br/><br/>
</div>
</div> <!-- /container -->
<div data-iframe-height></div>
<select id="type" onchange="changeType('clicked');" style="display: none">
<option value="ASY" selected="selected">Asylum</option>
<option value="ORI">Origin</option>
</select>
<script src="js/main.js?cache=009g"></script>
<script src="https://unpkg.com/[email protected]/js/iframeResizer.contentWindow.min.js"></script>
</body>
</html>