-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (65 loc) · 2.36 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
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Vaccine Availability Tracker</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCbtyb7TR2Wbhzgs4KAtqBP_hppkQgDESQ&callback=initMap&libraries=&v=weekly" async></script>
<script src="js/papaparse.min.js"></script>
<script src="js/VaccineAvailability.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript">
var csvdata;
var a;
const stateSet = new Set()
Papa.parse('https://raw.githubusercontent.com/utkarshyadav46/vaccinetracker.github.io/main/data.csv', {
header: true,
download: true,
dynamicTyping: true,
complete: function(results) {
csvdata = results.data;
for(i=0;i<756;i++)
stateSet.add(results.data[i].state_name);
a=Array.from(stateSet);
const selectBox= document.querySelector('#mySelect');
for(i=0;i<a.length;i++)
{
// console.log(a[i]);
const newOption = document.createElement('option');
const optionText = document.createTextNode(a[i]);
newOption.appendChild(optionText);
newOption.setAttribute('value',i+1);
selectBox.appendChild(newOption);
}
}
});
</script>
</head>
<body style="background-color:rgb(127, 175, 214);">
<center>
<div id ="form"><br>
<h1><b>Vaccine Tracker</b></h1>
<br>
<form name="vaccineForm" action="#vaccine_slot" method="GET">
<select id="mySelect" onchange="showcities()", aria-placeholder="State">
<option value=""disabled selected>Select State</option>
</select>
<select id="citySelect">
<option value=""disabled selected>Select City</option>
</select>
<br>
<button class="btn btn-success" onclick="abc()">Check Availability</button>
</form>
</div>
</center>
<center>
<div id="vaccinated" >
</div></center>
<div id="vaccine_slot" class="table-responsive-sm -w auto">
</div>
<div class="col-sm-10" id='footer' style="margin:20px 0px 20px 0px;">
</div>
</body>
</html>