-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindia-map.html
443 lines (400 loc) · 23.6 KB
/
india-map.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
<!DOCTYPE html>
<html class="no-js" lang="zxx">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>BloodLytics</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" type="image/x-icon" href="assets/images/favicon.svg" />
<!-- ========================= CSS here ========================= -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" />
<link rel="stylesheet" href="assets/css/LineIcons.3.0.css" />
<link rel="stylesheet" href="assets/css/animate.css" />
<link rel="stylesheet" href="assets/css/tiny-slider.css" />
<link rel="stylesheet" href="assets/css/glightbox.min.css" />
<link rel="stylesheet" href="assets/css/main.css" />
<link rel="stylesheet" href="styles/india-map.css">
</head>
<!-- Start Header Area -->
<header class="header navbar-area">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-12">
<div class="nav-inner">
<!-- Start Navbar -->
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="index.html">
<img src="assets/images/BloodLytics.png" alt="Logo" style="width: 120%; height: 120%;">
</a>
<button class="navbar-toggler mobile-menu-btn" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="toggler-icon"></span>
<span class="toggler-icon"></span>
<span class="toggler-icon"></span>
</button>
<div class="collapse navbar-collapse sub-menu-bar" id="navbarSupportedContent">
<ul id="nav" class="navbar-nav ms-auto">
<li class="nav-item">
<a href="index.html">Home</a>
</li>
<li class="nav-item">
<ul class="sub-menu collapse" id="submenu-1-2">
<li class="nav-item"><a href="index.html#about">About</a></li>
<li class="nav-item"><a href="index.html#visualisations">Visualisations</a></li>
</ul>
</li>
<li class="nav-item">
<a href="index.html#about" aria-label="Toggle navigation">About</a>
</li>
</ul>
</div> <!-- navbar collapse -->
<div class="button">
<a href="index.html#visualisations" class="signup">Visualisations</a>
</div>
</nav>
<!-- End Navbar -->
</div>
</div>
</div> <!-- row -->
</div> <!-- container -->
</header>
<!-- End Header Area -->
<!-- Start Services Area -->
<section class="services section mt-10" style="background-color: white;">
<div class="container" id="visualisations">
<div class="section-title">
<h3 class="wow zoomIn" data-wow-delay=".2s">Indian States Voluntary Blood Donation Percentage for Year 2016
</h3>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-12 wow fadeInUp" data-wow-delay=".4s">
<div class="single-service one" style="background-color: aquamarine; ">
<div class="row align-items-center">
<div class="col-lg-6 col-md-4 col-12">
<!-- Content for the second column goes here -->
<p style="font-weight: bold; color: black">B&W
Color
</p>
<input type="range" min="1" max="2" value="1" class="slider" id="bw_or_color" />
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-12 wow fadeInUp" data-wow-delay=".4s">
<div class="single-service one" style="background-color: #D6EAF8;">
<div class="row align-items-center">
<div class="col-lg-6 col-md-4 col-12">
<div>
<div class="row">
<div class="col-md-4 col-6">
<p style="font-weight: 1000; color: blue">Voluntary Blood Donation Percentage
</p>
<p id="color1_text" style="color: black;">80 - 100% <span><svg width="14"
height="14">
<circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color">
</circle>
</svg></span></p>
<p id="color2_text" style="color: black;">70 - 80%<span><svg width="14"
height="14">
<circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color">
</circle>
</svg></span></p>
<p id="color3_text" style="color: black;">60 - 70% <span><svg width="14"
height="14">
<circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color">
</circle>
</svg></span></p>
<p id="color4_text" style="color: black;">50 - 60%<span><svg width="14"
height="14">
<circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color">
</circle>
</svg></span></p>
<p style="color: black;" id="color5_text">0 - 50% <span><svg width="14" height="14">
<circle cx="7" cy="7" r="7" fill="black"></circle>
</svg></span></p>
</div>
<div class="col-6 flex">
<p id="dynamic" style="color: black;">Uttar Pradesh, Meghalaya,Manipur, Assam,
Chhattisgarh have
Voluntary Blood
Donations Less than 50% compared to Replacement and Family Blood Donations.
</p>
</div>
</div>
</div>
<div id="india-map"></div>
</div>
</div>
</div>
</div>
</div>
<div style="text-align: center; margin-top: 2%">
<p style="font-weight: bolder; font-size: large;">Voluntary Blood Distribution in India (Year 2016): <a
href="https://naco.gov.in/sites/default/files/Assessment%20of%20Blood%20Banks%20in%20India%20-%202016.pdf"
style="color: #3366FF; text-decoration: none; font-weight: bold;"> Source Data Link</a></p>
</div>
<hr>
<div class="container" id="visualisations" style="padding-top: 5%; ">
<div class="section-title">
<h3 class="wow zoomIn" data-wow-delay=".2s">Distribution of Different types of Blood Donations For year
2021</h3>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-12 wow fadeInUp" data-wow-delay=".4s">
<div class="single-service one" style="background-color: orange; opacity: 90%; position: relative;">
<div class="row align-items-start">
<!-- Content for the second column goes here -->
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton1"
data-bs-toggle="dropdown" aria-expanded="false">
Select State
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1"
style="background-color: greenyellow; ">
<li class="dropdown-item" href="#" value="1">Andhra Pradesh </li>
<li class="dropdown-item" href="#" value="2">Arunachal Pradesh</li>
<li class="dropdown-item" href="#" value="3">Assam</li>
<li class="dropdown-item" href="#" value="4"> Bihar</li>
<li class="dropdown-item" href="#" value="5">Chhattisgarh</li>
<li class="dropdown-item" href="#" value="6">Delhi</li>
<li class="dropdown-item" href="#" value="7">Goa </li>
<li class="dropdown-item" href="#" value="8">Gujarat </li>
<li class="dropdown-item" href="#" value="9"> Haryana</li>
<li class="dropdown-item" href="#" value="10">Himachal Pradesh</li>
<li class="dropdown-item" href="#" value="11">Jammu and Kashmir</li>
<li class="dropdown-item" href="#" value="12">Jharkhand</li>
<li class="dropdown-item" href="#" value="13">Karnataka</li>
<li class="dropdown-item" href="#" value="14">Kerala</li>
<li class="dropdown-item" href="#" value="15">Madhya Pradesh</li>
<li class="dropdown-item" href="#" value="16">Maharashtra </li>
<li class="dropdown-item" href="#" value="17">Manipur </li>
<li class="dropdown-item" href="#" value="18">Meghalaya </li>
<li class="dropdown-item" href="#" value="19">Mizoram </li>
<li class="dropdown-item" href="#" value="20">Nagaland </li>
<li class="dropdown-item" href="#" value="21">Odisha </li>
<li class="dropdown-item" href="#" value="22">Punjab</li>
<li class="dropdown-item" href="#" value="23">Rajasthan </li>
<li class="dropdown-item" href="#" value="24">Sikkim </li>
<li class="dropdown-item" href="#" value="25">Tamil Nadu </li>
<li class="dropdown-item" href="#" value="26">Tripura</li>
<li class="dropdown-item" href="#" value="27">Uttar Pradesh </li>
<li class="dropdown-item" href="#" value="28">Uttarakhand </li>
<li class="dropdown-item" href="#" value="29">West Bengal </li>
</ul>
</div>
<div id="bw_or_color_for_pie" />
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-12 wow fadeInUp" data-wow-delay=".4s">
<div class="single-service one" style="background-color: bisque;">
<div class="row align-items-center">
<div class="col-lg-6 col-md-4 col-12">
<div>
<div class="row">
<div class="">
<p style="font-weight: 1000; color: blue; font-size: 25px;">Blood Donation Type
</p>
<p id="color1_text" style="color: black; font-size: 20px; margin: 10px">Voluntary
<span><svg width="30" height="30">
<circle cx=15" cy="15" r="30" fill="#21B0FE" id="color1_color">
</circle>
</svg></span>
</p>
<p id="color2_text" style="color: black; font-size: 20px; margin: 10px">
Family <span><svg
width="30" height="30">
<circle cx="15" cy="15" r="30" fill="#FED700" id="color2_color">
</circle>
</svg></span></p>
<p id="color3_text" style="color: black; font-size: 20px; margin: 10px">Replacement <span><svg width="30" height="30">
<circle cx="15" cy="15" r="30" fill="#FE218B" id="color3_color">
</circle>
</svg></span></p>
</div>
<div class="col-6 flex">
<p id="dynamic"> </p>
</div>
</div>
</div>
<div id="pie-chart"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="text-align: center; margin-top: 2%">
<p style="font-weight: bolder; font-size: large;"> State Wise Blood Unit Collection (Jan-Jun, 2021): <a
href="https://sansad.in/getFile/loksabhaquestions/annex/176/AU1896.pdf?source=pqals#:~:text=During%20January%20to%20June%202021,mobile%20and%20blood%20transportation%20vans."
style="color: #3366FF; text-decoration: none; font-weight: bold;"> Source Data Link</a></p>
</div>
<hr>
<!-- Start Footer Area -->
<footer class="footer section">
<!-- Start Footer Top -->
<div class="footer-top">
<div class="container">
<div class="inner-content">
<div class="row">
<div class="col-lg-2 col-md-6 col-12">
<!-- Single Widget -->
<div class="single-footer f-link">
<h3>Team</h3>
<ul>
<li><a href="https://github.com/hemanth-sunkireddy">Hemanth Sunkireddy</a></li>
<li><a href="javascript:void(0)">Bharath Gajawada</a></li>
<li><a href="javascript:void(0)">Jagankrishna Nallasingu</a></li>
</ul>
</div>
<!-- End Single Widget -->
</div>
<div class="col-lg-4 col-md-6 col-12">
<!-- Single Widget -->
<div class="single-footer newsletter">
<h3>Data Visualisation Project</h3>
<div>
<p>Phase 1 Report</p>
<a class="sub-btn"
href="https://github.com/hemanth-sunkireddy/Data-visualisation-Project"><i
class="lni lni-paperclip w-100 h-100"></i>
</a>
<p>Phase 2 Report</p>
<a class="sub-btn"
href="https://github.com/hemanth-sunkireddy/Data-visualisation-Project"><i
class="lni lni-paperclip w-100 h-100"></i>
</a>
<a class="sub-btn" href="https://youtu.be/nkydSQRsNBQ"><i
class="lni lni-youtube"></i></a>
</div>
</div>
<!-- End Single Widget -->
</div>
<div class="col-lg-4 col-md-6 col-12">
<!-- Single Widget -->
<div class="single-footer newsletter">
<div class="row">
<a href="https://github.com/hemanth-sunkireddy/BloodLytics">
<img src="assets/images/github.png" width="10%">
</a>
<a href="https://www.youtube.com/watch?v=uOzVvlwPF0Y">
<img src="assets/images/youtube.png" width="10%">
</a>
<a href="https://hemanth-sunkireddy.github.io/BloodLytics/">
<img src="assets/images/brand.png" width="13%" class="m-lg-0">
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--/ End Footer Top -->
</footer>
<!--/ End Footer Area -->
<!-- ========================= scroll-top ========================= -->
<a href="#" class="scroll-top">
<i class="lni lni-chevron-up"></i>
</a>
<!-- ========================= JS here ========================= -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/tiny-slider.js"></script>
<script src="assets/js/glightbox.min.js"></script>
<script src="assets/js/count-up.min.js"></script>
<script src="assets/js/main.js"></script>
<script src="d3_cdn/d3.v7.js"></script>
<script src="d3_cdn/d3.v7.min.js"></script>
<script src="scripts/d3-geo-projection.v2.min.js"></script>
<script src="scripts/d3-scale-chromatic.v1.min.js"></script>
<script src="scripts/india-map.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
var Slider = document.getElementById('bw_or_color');
function updateColors() {
var blackOrWhite = parseInt(Slider.value);
var firstColor = document.getElementById('color1_text');
var secondColor = document.getElementById('color2_text');
var thirdColor = document.getElementById('color3_text');
var fourthColor = document.getElementById('color4_text');
var fifthColor = document.getElementById('color5_text');
if (blackOrWhite == 1) {
firstColor.innerHTML = '80 - 100% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '70 - 80% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#F0EFEF" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '60 - 70% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#D3D3D3" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '50 - 60% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#A9A9A9" id="color4_color"></circle></svg></span>';
} else {
firstColor.innerHTML = '80 - 100% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#993300" id="color1_color"></circle></svg></span>';
secondColor.innerHTML = '70 - 80% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#cc4c02" id="color2_color"></circle></svg></span>';
thirdColor.innerHTML = '60 - 70% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fe9929" id="color3_color"></circle></svg></span>';
fourthColor.innerHTML = '50 - 60% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#fff7bc" id="color4_color"></circle></svg></span>';
fifthColor.innerHTML = '0 - 50% <span><svg width="14" height="14"><circle cx="7" cy="7" r="7" fill="#FFFFFF" id="color5_color"></circle></svg></span>';
}
}
updateColors();
Slider.addEventListener('input', function () {
updateColors();
});
// Get the dropdown items
var dropdownItems = document.querySelectorAll('.dropdown-item');
// Add click event listener to each dropdown item
dropdownItems.forEach(function (item) {
item.addEventListener('click', function () {
// Get the value of the selected item
var selectedValue = this.getAttribute('value');
console.log('Selected value: ' + selectedValue);
// Use this selectedValue as needed
});
});
});
let states = [
"Andhra Pradesh",
"Arunachal Pradesh",
"Assam",
"Bihar",
"Chhattisgarh",
"Goa",
"Gujarat",
"Haryana",
"Himachal Pradesh",
"Jammu and Kashmir",
"Jharkhand",
"Karnataka",
"Kerala",
"Madhya Pradesh",
"Maharashtra",
"Manipur",
"Meghalaya",
"Mizoram",
"Nagaland",
"Odisha",
"Punjab",
"Rajasthan",
"Sikkim",
"Tamil Nadu",
"Telangana",
"Tripura",
"Uttarakhand",
"Uttar Pradesh",
"West Bengal",
"Andaman and Nicobar Islands",
"Chandigarh",
"Dadra and Nagar Haveli",
"Daman and Diu",
"Delhi",
"Lakshadweep",
"Puducherry"
]
</script>
</section>
</body>
</html>