-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
210 lines (164 loc) · 7.02 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
<!DOCTYPE html>
<html>
<head>
<title>UCLA Sandbox COVID-19 Maproom</title>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-160606542-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-160606542-1');
</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- leaflet -->
<link rel="stylesheet" href="css/leaflet.css" />
<script src="js/leaflet.js"></script>
<!-- google fonts -->
<link href="https://fonts.googleapis.com/css?family=Economica&display=swap" rel="stylesheet">
<!--jQuery-->
<script src="js/jquery.min.js"></script>
<!--Plugin JavaScript file-->
<link rel="stylesheet" href="css/ion.rangeSlider.min.css"/>
<script src="js/ion.rangeSlider.min.js"></script>
<!-- papa parse for csv handling -->
<script src="js/papaparse.min.js"></script>
<!-- bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="js/popper.min.js" crossorigin="anonymous"></script>
<script src="js/bootstrap.min.js" crossorigin="anonymous"></script>
<script src="js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<!-- charts -->
<link rel="stylesheet" href="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.css">
<script src="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.js"></script>
<link rel="stylesheet" href="styles/style.css">
<script type="text/javascript" src="js/chart.min.js"></script>
</head>
<body>
<!--
map display using bootstrap layout
-->
<div class="container-fluid h-100">
<div class="row h-100" >
<div class="col-sm-12 fill no-padding">
<div id="map"></div>
</div>
</div>
</div>
<!--
ucla oit logo
data sources
-->
<div id="logo" class="col-sm-2" id="data-panel" style="position: absolute;top:20px;left: 10px;background-color: rgba(255,255,255,0.8);z-index:999;">
<div><a href="https://idre.ucla.edu/" target="_blank"><img src="images/oit.png" width="100%" style="margin-left:-10px"></a></div>
<div id="info-panel">
<button id="btn-global" class="btn btn-info btn-sm" onclick="window.location.href = '?geo=global'">Global</button>
<button id="btn-us" class="btn btn-info btn-sm" onclick="window.location.href = '?geo=us'">US</button>
<!-- <button id="btn-ca" class="btn btn-info btn-sm" onclick="window.location.href = '?geo=ca'">California</button> -->
<button id="btn-la" class="btn btn-info btn-sm" onclick="window.location.href = '?geo=la'">Los Angeles</button>
<p>
Data Source:
<br>
<span id="datasource">
<a href="https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data" target="_blank">COVID-19 Data Repository by Johns Hopkins CSSE</a>
</span>
</p>
<p style="background-color: white;padding:5px;">
<span id="last-updated"></span>
</p>
</div>
</div>
<!--
small window data display
-->
<div class="col-sm-2" align="center" style="position:absolute;left:10px; bottom:20px;z-index:999;">
<div align="center" style=" background-color:rgba(255,255,255,0.7);padding:5px;">
<p style='text-align:center' id="datedisplay">Date</p>
<button id="btn-play" type="button" class="btn btn-danger btn-sm" onclick="corona.startAnimation()">Play</button><br>
Show data with symbols that are:<br>
<button id="btn-proportional" type="button" class="btn btn-info btn-sm" onclick="corona.changeScale('proportional')">Proportional</button>
<button id="btn-log" type="button" class="btn btn-info btn-sm" onclick="corona.changeScale('log')">Logarithmic</button>
</div>
<div style="padding:5px;">
<button id="btn-confirmed" disabled type="button" class="btn btn-light btn-sm" onclick="corona.changeDataLabel('confirmed')">Confirmed<img src="images/icons/arrow-bar-right.svg" alt="" width="16" height="16" title="Bootstrap"></button>
<button id="btn-deaths" type="button" class="btn btn-light btn-sm" onclick="corona.changeDataLabel('deaths')">Deaths<img src="images/icons/arrow-bar-right.svg" alt="" width="16" height="16" title="Bootstrap"></button>
<!-- <button id="btn-recovered" type="button" class="btn btn-light btn-sm" onclick="corona.changeDataLabel('recovered')">recovered<img src="images/icons/arrow-bar-right.svg" alt="" width="16" height="16" title="Bootstrap"></button> -->
</div>
</div>
<!--
animated time bar
-->
<div class="row justify-content-md-center">
<div class="col-sm-8" align="center" style="position:absolute; top:20px;z-index:999;">
<div class="col-md-auto" style=" background-color:rgba(0,0,0,0.5);padding:10px;">
<!-- timebar -->
<input type="text" id="timebar" style=""></input>
</div>
</div>
</div>
<!--
chart
-->
<div id="chart-container" style="display:none;" class="row justify-content-md-center">
<div class="col-sm-8" align="center" style="position:absolute; bottom:20px;z-index:999;">
<div class="col-md-auto" style=" background-color:rgba(0,0,0,0.5);padding:10px;">
<span id="chart-title" style="color:silver">Title</span>
<canvas id="chart" class="ct-chart" height="100px"></canvas>
<!-- <div id="chart" class="ct-chart"></div> -->
</div>
</div>
</div>
<!-- map type -->
<div id="maptype" class="dropdown" style="position:absolute; top:20px;right:80px;z-index:999">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Map Type
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#" id="basemap-light">Light</a>
<a class="dropdown-item" href="#" id="basemap-dark">Dark</a>
<a class="dropdown-item" href="#" id="basemap-satellite">Satellite</a>
</div>
</div>
<!--
ranking display table
-->
<div id="rankingtable-container" class="col-sm-2" align="center" style="overflow:auto;opacity: 0.8; position:absolute;right:10px; bottom:20px;z-index:999;">
<table id="rankingtable" class="table table-dark table-sm table-hover">
<tbody>
<tr>
<td width="50%"></td>
<td align="right">Cases</td>
<td align="right">Deaths</td>
<!-- <td>recovered</td> -->
</tr>
</tbody>
</table>
</div>
<!--
Modal with welcoming info
-->
<div class="modal fade" id="coronamodal">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Welcome</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!--
Javascript that does all the magic
-->
<script type="text/javascript" charset="utf8" src="js/corona.config.js"></script>
<script type="text/javascript" charset="utf8" src="js/corona.data.js"></script>
<script type="text/javascript" charset="utf8" src="js/corona.map.js"></script>
</body>
</html>