-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
538 lines (475 loc) · 26.5 KB
/
index.html
File metadata and controls
538 lines (475 loc) · 26.5 KB
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>The Opioid Crisis</title>
<!-- REFERENCES TO CSS STYLE SHEETS-->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/vis1.css">
<link rel="stylesheet" href="css/vis3.css">
<link rel="stylesheet" href="css/vis4.css">
<link rel="stylesheet" href="css/jquery.fullPage.css"/>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/video.css">
<link rel='icon' type='image/x-icon' href='favicon.ico' />
<link href="https://fonts.googleapis.com/css?family=Nunito+Sans" rel="stylesheet">
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> -->
</head>
<body>
<div class="container-fluid" id="fullpage">
<div id = "vidsection" class = "section video_section">
<div id="overlay">
<div align = "center" id = vidtext1> On October 26th 2017, President Donald J. Trump declared the opioid epidemic a public health emergency. </div>
<div align = "center" id = vidtext2> Click to see his full speech. </div>
<div align = "center" id = vidtext3> Scroll down to view the data that led him to this conclusion.
<br>
<i id="#moveDown" class="fa fa-angle-down" style="font-size: 4.5em;" aria-hidden="true"></i>
</div>
</div>
<div class = "row">
<h1 id="title_embellishment" align="center">A Worldwide Problem</h1>
</div>
<div class = "row">
<div class = "col-md-12" align = "center">
<iframe id="vimeo-player"
src="https://player.vimeo.com/video/246623674?autoplay=0&byline=0&portrait=0#t=6m44s"
width="1000" height="562" frameborder="0" webkitallowfullscreen mozallowfullscreen
allowfullscreen></iframe>
</div>
</div>
</div>
<div class="section vis1_section">
<!--Pill Container Visualization-->
<div class = "row spaced_up_vis1">
<h2 align = "center">The US Consumes The Most Opioids In the World </h2>
</div>
<div class = "row">
<div class="col-md-12">
<h3 id="vis1_fade_in" align = "center" > Top 10 Consumers of the Global Opioid Supply (Each Pill Represents 500kg)</h3>
</div>
<!--<div class="col-md-3">
<button align ="center" class="button" type="button" onclick="vis1_GO()"><span>Play again</span></button>
</div>-->
</div>
<br>
<div class="row">
<div class="col-md-12" align="center">
<div id="vis1"></div>
<svg width="1200" height="75" style="background-color:#4f5357">
<rect x="95" y="13" width="1010" height="50" fill="#484f5b" rx="20" ry="20" id="vis1_legend_box"/>
<foreignobject class="vis1_node" x="-65" y="25" width="1200" height="200">
<form class="vis1_form" id="vis1_legend_options">
Data Year:
<input type="number" id="vis1_singleYear" min="1980" max="2015" value="2015">
     Substances:  
<input type="checkbox" id="vis1_methadone" value="methadone" checked> <span id="vis1_methadone_text"> Methadone    </span>
<input type="checkbox" id="vis1_morphine" value="morphine" checked> <span id="vis1_morphine_text">Morphine    </span>
<input type="checkbox" id="vis1_pethidine" value="pethidine" checked> <span id="vis1_pethidine_text">Pethidine    </span>
<input type="checkbox" id="vis1_oxycodone" value="oxycodone" checked> <span id="vis1_oxycodone_text">Oxycodone    </span>
<input type="checkbox" id="vis1_fentanyl" value="fentanyl" checked> <span id="vis1_fentanyl_text">Fentanyl    </span>
<input type="checkbox" id="vis1_hydromorphone" value="hydromorphone" checked> <span id="vis1_hydromorphone_text">Hydromorphone </span>
</form>
</foreignobject>
<foreignobject class="vis1_node" x="950" y="10" width="100" height="200">
<span id="vis1_replay_button"></span>
</foreignobject>
</svg>
</div>
</div>
</div>
<!--GUNS, CARS, DRUGS, AND PEOPLE VISUALIZATION -->
<div class="section vis2_section">
<div class="row">
<h2 id="vis2_title" align="center">So how big is this problem?</h2>
</div>
<div class="row">
<div class="col-md-5" style="height:100vh;">
<div class="row" style="height:40vh;">
<div class="col-md-12">
<div class = "row top_row_gun">
<div id="gun_text" align="center" class="title">Gun homicides killed <span class="lined"> <span class="red red1">13,000</span> people in 2016 </span></div>
</div>
<div class="row row_bellow">
<div class="col-md-3"></div>
<img id= "vis2gun" class="col-md-3" src="img/gun.png" alt="Visualization 1">
<div id="gun_icons" class="col-md-4 icons" style="font-size: 0.7em;">
</div>
<div class="col-md-2"></div>
</div>
</div>
</div>
<div id="car_row" class="row" style="height:60vh;">
<div class="col-md-12">
<div class = "row top_row_car">
<div id="car_text" align="center" class="title">Car crashes killed <span class="lined"> <span class="red red2">38,000</span> people in 2016 </span></div>
</div>
<div class="row row_bellow">
<div class="col-md-2"></div>
<i id="vis2car_icon" class="fa fa-car col-md-3" aria-hidden="true" style="font-size: 55px;"></i>
<div id="vis2car" class="col-md-5 icons" style="font-size: 0.5em;">
</div>
<div class="col-md-2"></div>
</div>
</div>
</div>
</div>
<div id="drug_row" class="col-md-7" style="height:100vh">
<div class = "row top_row big_row">
<div id="drug_text" align="center" class="title">Drug overdose is the leading cause of accidental <span class="lined">death in the US, killling <span class="red red3">52,404</span> people in 2016 </span></div>
</div>
<div class="row row_bellow">
<div class="col-md-2"></div>
<img id= "vis2can" class="col-md-4" src="img/pill_can.png" alt="Visualization 1">
<div id="vis2drugs" class="col-md-6 icons" >
</div>
</div>
</div>
</div>
</div>
<div class="section vis3_section">
<div class = "row vis3select" align = "center">
<h2 id="vis3title" align = "center">And Opioid Deaths Are on the Rise</h2>
<div class="row">
<div id = "vis3text" class = "vis3text col-md-6"></div>
</div>
</div>
<div class="row row_no_margin">
<div id="select2" class="btn-group vis3_button_group" data-toggle="buttons">
<label class="btn btn-primary active vis3_button">
<input class="button_text" type="radio" name="options" id="option1" value="default" checked> Opioid Deaths
</label>
<label class="btn btn-primary vis3_button">
<input class="button_text" type="radio" name="options" id="option2" value="other">Other Sources
</label>
<label class="btn btn-primary vis3_button">
<input class="button_text" type="radio" name="options" id="option3" value="Sex">Gender
</label>
<label class="btn btn-primary vis3_button">
<input class="button_text" type="radio" name="options" id="option4" value="Race">Race
</label>
<label class="btn btn-primary vis3_button">
<input class="button_text" type="radio" name="options" id="option5" value="Age">Age
</label>
</div>
</div>
<div class="row">
<div id = "vis3" class = "col-md-12"></div>
<!-- <div id = "vis3" class = "col-md-6"></div> -->
<!-- <div id = "vis3text" class = "vis3text col-md-6"></div> -->
</div>
</div>
<div class="section">
<h5 align="center">Death in Your Community</h5>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-3">
<div class="form-group input" align="center">
<label for="zip_input">Enter Your Zip Code</label>
<input type="text" class="form-control" id="zip_input" value="02138">
</div>
</div>
<div id="zip_button_case" class="col-md-3">
<button id="zip_button" type="submit" class="btn btn-primary" onclick="vis5_disp()">Submit</button>
</div>
<div class="col-md-2"></div>
</div>
<!-- <div class="row">
<div class="col-md-3"></div>
<div id="vis5" class="col-md-6"></div>
<div class="col-md-3"></div>
</div> -->
<div class="row" align="center">
<div id="vis5" align="center"></div>
</div>
</div>
<div class="section vis4_section">
<!--Choropleth map of Opiod Dealths-->
<div class = "row">
<h2 id="space_up" align="center">Your County in Context</h2>
<!--Select Box for choosing data-->
<div class="row">
<div class="col-md-8">
<h3 id="toggle_text" align="center">Toggle between Deaths and Crude Rate (1999 and 2015).</h3>
</div>
<div id="select1" class="col-md-4" align="center">
<div style = "padding-top: 10px" align = "center">
<select align = "center" class="form-control" id = "dataSelect" onchange="createScalesAndLegend()">
<option value="Crude Rate">Crude Rate</option>
<option value="Deaths">Total Deaths</option>
</select>
</div>
</div>
<div class="col-md-5"></div>
</div>
<div id = "vis4" align="center"></div>
</div>
</div>
<div class="section">
<div class="row">
<h2 id="help_section_title" align = "center">Do Your Part to Save Lives</h2>
</div>
<div class="row">
<div class="container">
<div class="col-md-4 flip">
<div id="narcam_section" class="expand">
<!-- <img id="narcam_img" src="img/narcam.png" alt="Narcam"> -->
<div class="help_title"><a href="https://www.narcan.com/">Narcan</a></div>
<br>
<p id="narcam_text"> The only FDA-approved nasal treatment of opioid overdose</p>
<br>
<p>Narcan reverses the affects of an opioid overdose and saves lives. Currently one use of Narcan costs <br> <br> <br> <span class="big_text">140$</span></p>
<br>
<p>Petition your <a href="https://www.senate.gov/general/contact_information/senators_cfm.cfm">senator</a> to bring the price down.</p>
</div>
<div class="flipper">
<div class="middle">Save Lives</div>
</div>
</div>
<div class="col-md-4 flip">
<div id="rize_section" class="expand">
<!-- <img id="narcam_img" src="img/rize.png" alt="Rize"> -->
<div class="help_title"><a href="https://rizema.org/">Rize</a></div>
<br>
<p id="narcam_text">A new nonprofit in Massachusetts</p>
<br>
<p>Since 2013, Massachusetts has seen a 60% increase in Opioid Overdose Deaths. Rize hopes to raise</p>
<br>
<p> <span class="big_text">$50 million</span> <br> <br> <br> over the next three years to battle opioid addiction in Boston.</p>
<p>Join their mailing list <a href="https://rizema.org/email-signup/">here</a> or <a href="https://rizema.org/support/">donate</a>.</p>
</div>
<div class="flipper">
<div class="middle">Join the Movement</div>
</div>
</div>
<div class="col-md-4 flip">
<div id="needle_section" class="expand">
<!-- <img id="narcam_img" src="img/needle.png" alt="Rize"> -->
<div class="help_title"><a href="http://www.wbur.org/commonhealth/2017/11/14/needles-near-boston-schools">Discarded Needles</a></div>
<br>
<p id="narcam_text"> Pose a health threat especially toward young children and pets.</p>
<br>
<p>Boston has only <a href="http://www.bphc.org/whatwedo/Recovery-Services/services-for-active-users/Pages/Safe-Needle-and-Syringe-Disposal.aspx">9</a> needle disposal stations. Last year, more than <br> <br> <br> <span class="big_text">20,000</span> <br> <br> <br> littered needles were collected outside these stations. <a href="https://www.bostonglobe.com/metro/2017/08/16/pharmacies-could-collect-used-needles-under-council-proposal/wOReEj2J3QyS1IEVNFWM4J/story.html">Learn more </a>about the proposal to require pharmacies to open used needle disposal stations.</p>
</div>
<div class="flipper">
<div class="middle">Discard Needles</div>
</div>
</div>
</div>
</div>
</div>
<div class="section">
<div id="team_title" class="row title" align="center">
Meet Our Team
</div>
<div class="container">
<div class="col-md-4" align="center">
<img class="img-circle" src="img/juliana.jpg">
<h6 class="name_title">Juliana Rogoff</h6>
<p>Sophomore, Quincy House <br> <br>
Juliana studies Integrative Biology with a secondary in Computer Science <br>
In her spare time, she dances for Harvard's Passus Step team.
</p>
</div>
<div class="col-md-4" align="center">
<img class="img-circle" src="img/lucas.jpg">
<h6 class="name_title">Lucas Guzman</h6>
<p>Sophomore, Lowell House <br> <br>
Lucas studies Computer Science and Engineering Sciences <br>
In his spare time, he works in a Physics Lab and sings in the Harvard Glee Club.
</p>
</div>
<div class="col-md-4" align="center">
<img class="img-circle" src="img/carter.jpg">
<h6 class="name_title">Carter Wilcox</h6>
<p>Sophomore, Winthrop House <br> <br>
Carter studies History with a secondary in Computer Science <br>
In his spare time, he consults for the Harvard College Consulting Group.
</p>
</div>
</div>
</div>
<div class="section">
<div id="team_title" class="row title" align="center">
References
</div>
<div class="container">
<div class="col-md-4">
<h6 class="ref_title">Data on Death</h6>
<ul>
<li><a href="https://www.cdc.gov/nchs/data_access/vitalstatsonline.htm#Mortality_Multiple">National Center for Health Statistics</a></li>
<li><a href="https://wonder.cdc.gov/">Wonder Online Database</a></li>
<li><a href="https://www.asam.org/docs/default-source/advocacy/opioid-addiction-disease-facts-figures.pdf">American Society of Addiction Medicine</a></li>
<li><a href="https://en.wikipedia.org/wiki/List_of_motor_vehicle_deaths_in_U.S._by_year">Car Deaths</a></li>
<li><a href="http://www.who.int/gho/hiv/en/">HIV Deaths</a></li>
<li><a href="https://gun-control.procon.org/view.resource.php?resourceID=006094">Gun Deaths</a></li>
<li><a href="http://www.painpolicy.wisc.edu/countryprofiles">Global Inports</a></li>
</ul>
</div>
<div class="col-md-4">
<h6 class="ref_title">Visuals</h6>
<ul>
<li><a href="https://www.flaticon.com/free-icon/revolver_620795#term=gun&page=1&position=2">Gun Icon</a></li>
<li><a href="https://thenounproject.com/term/pill-bottle/12720/">Pill Bottle Icon</a></li>
<li><a href="https://thenounproject.com/term/pill-bottle/20465/">Favicon</a></li>
<li><a href="https://icons8.com/icon/39942/expand-arrow">Down Arrow</a></li>
<li><a href="https://www.youtube.com/watch?v=UmDr_Vquc6A">Trump's Video</a></li>
</ul>
</div>
<div class="col-md-4">
<h6 class="ref_title">Locational</h6>
<ul>
<li><a href="https://www.gaslampmedia.com/download-zip-code-latitude-longitude-city-state-county-csv/">Zip Code to County</a></li>
<li><a href="https://d3js.org/us-10m.v1.json">USA Topology</a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- Load Pre-Built JS libraries -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/d3.js"></script>
<script src="js/d3.min.js"></script>
<script src="js/d3-tip.js"></script>
<script src="js/queue.js"></script>
<script src="js/d3-legend.min.js"></script>
<script src="js/d3-legend.js"></script>
<script src="js/topojson.js"></script>
<script src="js/colorbrewer2.js"></script>
<script src="js/jquery.fullPage.js "></script>
<!--<script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script>-->
<script src="https://player.vimeo.com/api/player.js"></script>
<script>
//play and pause of beginning youtube video
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
$(document).ready(function() {
$('#fullpage').fullpage({
menu: '#menu',
lockAnchors: false,
// anchors: ['firstPage', 'secondPage', '3rdPage', '4thpage', 'lastPage'],
navigation: true,
navigationPosition: 'right',
navigationTooltips: ["Trump's Speech", 'Worldwide Comsumption',
'Deaths in 2016', 'Deaths On the Rise', 'Death in Your Community', 'Map', 'Help', 'Team', 'References'],
showActiveTooltip: false,
slidesNavigation: false,
slidesNavPosition: 'bottom',
scrollBar:true,
// autoScrolling:false
// automatic scroll
afterRender: function() {}
});
var clicked = false;
player.on('timeupdate', function(data) {
if (data["seconds"] >= 405.700 && !clicked) {
clicked = true;
var currentvolume = 1;
downsizeVolume(currentvolume);
function downsizeVolume(currentvolume){
console.log(currentvolume);
currentvolume -= 0.1;
if (currentvolume <= 0) {
player.pause().then(function() {
// the video was paused
}).catch(function(error) {
switch (error.name) {
case 'PasswordError':
// the video is password-protected and the viewer needs to enter the
// password first
break;
case 'PrivacyError':
// the video is private
break;
default:
// some other error occurred
break;
}
});
//ADD SVG OVERLAY
on();
var window_top = $(window).scrollTop();
var window_bottom = $(window).scrollTop() + $(window).height();
var window_middle = (window_top + window_bottom) / 2.0;
var target_top = $(".video_section").position().top;
var target_bottom = $(".video_section").position().top + $(window).height();
if(window_middle > target_top && window_middle < target_bottom) {
$('#overlay').css('visibility', 'visible').hide().fadeIn(250);
setTimeout(function () {
$('#vidtext1').css('visibility', 'visible').hide().fadeIn(400);
}, 250);
setTimeout(function () {
$('#vidtext2').css('visibility', 'visible').hide().fadeIn(250);
}, 3000);
// setTimeout(function () {
// $('#vidtext3').css('visibility', 'visible').hide().fadeIn(250);
// }, 5000);
setTimeout(function () {
$('#vidtext3').css('visibility', 'visible').hide().fadeIn(250);
}, 5000);
}
}
else {
setTimeout(function () {
player.setVolume(currentvolume);
downsizeVolume(currentvolume);
}, 100);
}
}
}
//make overlay disappear on click
$("#overlay").click(function(){
$('#overlay').fadeOut(500);
setTimeout(function () {
off();
player.setVolume(1);
player.play().then(function() {
// the video was played
}).catch(function(error) {
switch (error.name) {
case 'PasswordError':
// the video is password-protected and the viewer needs to enter the
// password first
break;
case 'PrivacyError':
// the video is private
break;
default:
// some other error occurred
break;
}
});
}, 500);
});
});
});
function on() {
document.getElementById("overlay").style.display = "block";
}
function off() {
document.getElementById("overlay").style.display = "none";
// document.getElementById("overlay").remove();
}
$(window).on("scroll.scroll2", function () {
console.log("scroll event");
player.setVolume(1);
$('#overlay').fadeOut(500);
setTimeout(function () {
off();
} , 500)
// $(this).off('scroll.scroll2');
});
// $(document).on('click', '#moveDown', function(){
// $.fn.fullpage.moveSectionDown();
// });
</script>
<!-- Load Our JS files -->
<script src="js/vis2.js"></script>
<script src="js/vis1.js"></script>
<script src="js/vis4.js"></script>
<script src="js/vis3.js"></script>
<script src="js/vis5.js"></script>
<script src="js/main.js"></script>
</body>
</html>