-
Notifications
You must be signed in to change notification settings - Fork 0
/
Maharashtra.html
328 lines (248 loc) · 11.1 KB
/
Maharashtra.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
<!DOCTYPE html>
<html>
<title>Maharashtra</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body,h1 {font-family: "Raleway", Arial, sans-serif;
background-image:url(https://image.freepik.com/free-vector/realistic-coronavirus-background_23-2148497718.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover
}h1 {letter-spacing: 6px}
.w3-row-padding img {margin-bottom: 12px}
</style>
<script src="https://kit.fontawesome.com/c939d0e917.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" >
var andhra_data=[['Dictrict','Confirmed']];
google.charts.load("current", {packages:["corechart"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var x='https://api.covid19india.org/v2/state_district_wise.json';
$.getJSON(x,function(statedata){
for (i=0;i<statedata.length;i=i+1){
if(statedata[i].state=="Maharashtra"){
for (j=0;j<statedata[i].districtData.length;j=j+1){
andhra_data.push([statedata[i].districtData[j].district,statedata[i].districtData[j].confirmed]);
}
}
}
var data = google.visualization.arrayToDataTable(andhra_data);
console.log(data);
var options = {
legend: 'none',
pieSliceText: 'label',
title: "Maharashtra",
pieStartAngle: 100
};
var chart = new google.visualization.PieChart(document.getElementById('Andhra'));
chart.draw(data, options);
});
}
</script>
<script>
y="https://api.covid19india.org/resources/resources.json";
$.getJSON(y,function(s){
var t="";
for (j=0;j<s.resources.length;j=j+1){
if(s.resources[j].state=="Maharashtra" && s.resources[j].category=="CoVID-19 Testing Lab"){
t+=`<div class="resource-list">
<div class="resource-container">
<div class="resource-info-container">
<div class="resource-details">
<span style="color :black"><b>Organization:<b> ${s.resources[j].nameoftheorganisation}</span><br>
<span style="color :red"><b>City :<b>${s.resources[j].city}</span><br>
<span style="color :aqua"><b>Phone :<b> ${s.resources[j].phonenumber}</span><br>
<span style="color :green"><b>Contact :<b> ${s.resources[j].contact}</span><br>
<span style="color :brown"><b>Description :<b> ${s.resources[j].descriptionandorserviceprovided}</span>
</div>
</div>
</div>
</div>
</div>`
}
}
console.log(t);
document.querySelector('.resources').innerHTML = t;
});
</script><script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script>
var dailyConf=[];
var dailyRec=[];
var dailyDeaths=[];
window.onload = function () {
var y="https://api.covid19india.org/states_daily.json";
$.getJSON(y,function(stateDailydata){
for (i=0;i<stateDailydata.states_daily.length-3;i=i+3){
dailyConf.push({label: stateDailydata.states_daily[i].date,y: parseInt(stateDailydata.states_daily[i].mh)});
dailyRec.push({label:stateDailydata.states_daily[i].date,y:parseInt(stateDailydata.states_daily[i+1].mh)});
dailyDeaths.push({label:stateDailydata.states_daily[i].date,y:parseInt(stateDailydata.states_daily[i+2].mh)});
}
var chart = new CanvasJS.Chart("chartContainer",
{
theme:"light1",
animationEnabled: true,
animationDuration: 2500,
title:{
fontSize:14,
text: "Daily Chart"
},
axisY: {
title: "No. of cases",
includeZero: false,
},
legend:{
cursor: "pointer",
fontSize: 16,
itemclick: toggleDataSeries
},
toolTip:{
shared: true
},
data: [{
name: "Confirmed",
type: "spline",
yValueFormatString: "###",
showInLegend: true,
dataPoints: dailyConf,
color:"deepskyblue"
},
{
name: "Deaths",
type: "spline",
yValueFormatString: "###",
showInLegend: true,
dataPoints: dailyDeaths,
color:"red"
},
{
name: "Recovered",
type: "spline",
yValueFormatString: "### ",
showInLegend: true,
dataPoints: dailyRec,
color:"green"
}]
});
chart.render();
function toggleDataSeries(e){
if (typeof(e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
e.dataSeries.visible = false;
}
else{
e.dataSeries.visible = true;
}
chart.render();
}
});
}
</script>
<script>
x="https://api.covid19india.org/v2/state_district_wise.json";
$.getJSON(x,function(stated){
var tableD="";
stated.forEach(function(s, index){
if(s.state=="Maharashtra"){
for (j=0;j<s.districtData.length;j=j+1){
tableD+=`<tr class="data-div" style="background: none;">
<td style="color:crimson;"><div> </div>${s.districtData[j].district}:</td>
<td style="color: deepskyblue;"><div> <i class="fa fa-arrow-up" style=" color: rgb(0, 181, 255); font-size: 12px; font-weight: normal; visibility: hidden;">0</i></div><span>${s.districtData[j].confirmed}</span></td>
<td style="color: green;;"><div> <i class="fa fa-arrow-up" style="color: lightgreen; font-size: 12px; font-weight: normal; visibility: hidden;">0</i></div><span>${s.districtData[j].recovered}</span></td>
<td style="color: red;"><div> <i class="fa fa-arrow-up" style="color: red; font-size: 12px; font-weight: normal; visibility: hidden;">0</i></div><span>${s.districtData[j].deceased}</span></td>
</tr>`}
}
});
console.log(tableD);
document.querySelector('.tbody').innerHTML = tableD;
});
</script>
<style>
.resource-list {
padding-left: 20px;
padding-right: 20px;
font-family: "Times New Roman", Times, serif;
}
.resource-container {
display: flex;
border-bottom: 1px solid #979797;
cursor: pointer;
}
.resource-info-container {
flex-grow: 1;
color: thistle;
}
.resource-details {
font-size: 17px;
color: rgb(148, 221, 226);
margin-top: 5px;
}
.resource-list-container {
max-width: 500px;
padding-left:5px;
padding-top:5px;
opacity: 1;
z-index: 30;
bottom: 20px;
}
.table{
margin-left: auto; border-radius:10px;
font-family: "Times New Roman", Times, serif;
max-width:500px;
height: 270px;
overflow-y: scroll;
overflow-x: scroll;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
background-color: cornsilk;
}
.internal-table{
margin-left: auto; border-radius:10px;
margin-left: auto; border-radius:10px;
max-width:470px;
height:100px;
font-family: "Times New Roman", Times, serif;
}
</style>
</head>
<body>
<!-- !PAGE CONTENT! -->
<div class="w3-content" style="max-width:1500px">
<!-- Header -->
<header class="w3-panel w3-center w3-opacity" style="background-image: linear-gradient(#000d20,#020202 );">
<div style=" padding-top: 15px;padding-bottom: 15px;">
<div>
<a href="main.html" class=" w3-button w3-light-grey"><b>Home<b></a>
<a href="country.html" class=" w3-button w3-light-grey"><b>India Updates<b></a>
<a href="world.html" class=" w3-button w3-light-grey"><b>World Updates<b></a>
<a href="aboutcovid19.html" class=" w3-button w3-light-grey"><b>About Covid19<b></a>
</div>
</div>
</header>
<h2 class=" w3-center" style="color: rgb(34, 34, 34); font-size:40px; font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;text-shadow: 7px 7px 15px 1px rgba(0,0,0,0.16);">Maharashtra</h2>
<!-- Photo Grid -->
<div class="w3-row-padding " style="margin-bottom:80px">
<div class="w3-half ">
<br>
<h3 style="color:crimson;margin-left: auto; border-radius:10px;">Chart based on Daily Data</h3> <div id="chartContainer" style=" margin-left: auto; border-radius:10px;background: rgb(252, 252, 252); color: rgb(34, 34, 34); box-shadow: 7px 7px 15px 1px rgba(0,0,0,0.16);max-width: 500px; height:270px"></div>
<br>
<h3 style="color:crimson;margin-left: auto; border-radius:10px;">Pie Chart(District)</h3>
<div id="Andhra"style="margin-left: auto; border-radius:10px;background: rgb(252, 252, 252); color: rgb(34, 34, 34); box-shadow: 7px 7px 15px 1px rgba(0,0,0,0.16);max-width: 500px; height:270px;"></div>
<br></div>
<div class="w3-half"><br>
<h3 style="color:crimson;margin-left: auto; border-radius:10px;">District Affect from Covid 19</h3><div class="table">
<table class="internal-table"><thead><tr class="label-div"><th style=" border-right-color: currentColor; border-right-width: medium; border-right-style: none; color:rgb(4, 39, 33)">DISTRICT</th><th style="color:rgb(4, 39, 33)">INFECTED</th><th style="color:rgb(4, 39, 33)">RECOVERED</th><th style="color:rgb(4, 39, 33)">DEATHS</th></tr></thead><tbody class="tbody"></tbody></table></div>
<br><h3 style="color:crimson;margin-left: auto; border-radius:10px;">Resources(Covid Labs)</h3><div class="resources" style=" overflow:scroll;margin-left: auto; border-radius:10px;background: rgb(252, 252, 252); color: rgb(34, 34, 34); box-shadow: 7px 7px 15px 1px rgba(0,0,0,0.16);max-width: 500px; height:270px"></div>
</div>
</div>
<!-- End Page Content -->
</div>
<!-- Footer -->
<footer class="w3-container w3-light-grey w3-center " style="padding-top:15px;padding-bottom: 15px;" >
<p>Click here to know about the developer <a href="https://www.linkedin.com/in/yash-gupta-0763a7162/" target="_blank" class="w3-text-green">YASH GUPTA</a> & <a href="https://www.linkedin.com/in/zia-fatima-5325b0169/" target="_blank" class="w3-text-green">ZIA FATIMA</a></p>
</footer>
</body>
</html>