This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
234 lines (210 loc) · 12.1 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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<title>COVID-19 by Country</title>
<meta name="title" content="COVID-19 by Country">
<meta name="description" content="This is a comparison of the COVID-19 pandemic by country, weighted by population. Every data series begins on the day that the corresponding country reached the 100<sup>th</sup> confirmed case.">
<meta name="keywords" content="COVID-19,country,comparison,population">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://cityxdev.github.io/covid19ByCountry">
<meta property="og:title" content="COVID-19 by Country">
<meta property="og:description" content="This is a comparison of the COVID-19 pandemic by country, weighted by population. Every data series begins on the day that the corresponding country reached the 100<sup>th</sup> confirmed case.">
<meta property="og:image" content="img/covid.png">
<!-- Twitter -->
<meta property="twitter:url" content="https://cityxdev.github.io/covid19ByCountry">
<meta property="twitter:title" content="COVID-19 by Country">
<meta property="twitter:description" content="This is a comparison of the COVID-19 pandemic by country, weighted by population. Every data series begins on the day that the corresponding country reached the 100<sup>th</sup> confirmed case.">
<meta property="twitter:card" content="">
<meta property="twitter:image" content="img/covid.png">
<script>
!function(g,s,q,r,d){r=g[r]=g[r]||function(){(r.q=r.q||[]).push(
arguments)};d=s.createElement(q);q=s.getElementsByTagName(q)[0];
d.src='//d1l6p2sc9645hc.cloudfront.net/tracker.js';q.parentNode.
insertBefore(d,q)}(window,document,'script','_gs');
_gs('GSN-559944-I');
_gs('set', 'anonymizeIP', true);
</script>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://www.amcharts.com/lib/4/core.js"></script>
<script type="text/javascript" src="https://www.amcharts.com/lib/4/charts.js"></script>
<script type="text/javascript" src="https://www.amcharts.com/lib/4/themes/material.js"></script>
<script type="text/javascript" src="https://www.amcharts.com/lib/4/lang/en_US.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/pieroxy/lz-string@master/libs/lz-string.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/cityxdev/cache4.js@master/cache4.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/cityxdev/jsloader@master/loader.min.js"></script>
<script type="text/javascript" src="js/util.js?v=20200428"></script>
<script type="text/javascript" src="js/modal.js?v=20200424"></script>
<script type="text/javascript" src="js/script.js?v=20200728"></script>
<link href="https://fonts.googleapis.com/css2?family=Muli:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/css.css?v=20200501">
</head>
<body>
<h1 class="title"><img alt="logo" src="img/covid.png" height="50px"/> COVID-19 By Country</h1>
<div class="intro">
<p>This is a comparison of the COVID-19 pandemic by country, weighted by population. Every data series begins on the day that the corresponding country reached the 100<sup>th</sup> confirmed case.<br/>
<a href="#" onclick="$('#about_modal').trigger('open')">more info</a>
</p>
</div>
<div class="menu">
<button id="choose_countries_button">Choose Countries</button>
<button id="random_countries_button">5 Random Countries</button>
<button class="inverse" id="share_button">Share</button>
</div>
<div class="day-0">
<div class="chart-title">
<h2>Country details</h2>
<div class="chart-desc">The day 0 of each country is the date when it reached 100 confirmed cases</div>
</div>
<div class="table-container"><table id="country_details_table"><thead><tr><th class="color">Color</th><th>Country</th><th>From day 0 until</th><th>Population</th></tr></thead><tbody></tbody></table></div>
</div>
<div id="charts">
<div class="chart-outer active" data-code="active">
<div class="chart-title">
<h2>Active cases per million inhab</h2>
</div>
<div class="chart-inner">
<!--<div class="add-simul-container"><label class="checkbox-label"><input type="checkbox" class="add-simulation-chk" id="add_simulation_active"/>show simulation</label></div>-->
<div class="chart-container" id="active_chart"></div>
</div>
<div class="embed-container"><button class="embed-button">embed</button></div>
</div>
<div class="chart-outer active-diff" data-code="active-diff">
<div class="chart-title">
<h2>Active cases daily growth (%)</h2>
<div class="chart-desc">Smoothed with moving average</div>
</div>
<div class="chart-inner">
<div class="add-context-container"><label class="checkbox-label"><input type="checkbox" class="add-context-chk" id="add_context_active_diff"/>show mobility daily deviation from baseline (%) [Google]</label></div>
<div class="chart-container" id="active_diff_chart"></div>
</div>
<div class="embed-container"><button class="embed-button">embed</button></div>
</div>
<div class="chart-outer conf" data-code="conf">
<div class="chart-title">
<h2>Confirmed cases per million inhab</h2>
</div>
<div class="chart-inner">
<div class="chart-container" id="conf_chart"></div>
</div>
<div class="embed-container"><button class="embed-button">embed</button></div>
</div>
<div class="chart-outer conf-diff" data-code="conf-diff">
<div class="chart-title">
<h2>Confirmed cases daily growth (%)</h2>
<div class="chart-desc">Smoothed with moving average</div>
</div>
<div class="chart-inner">
<div class="chart-container" id="conf_diff_chart"></div>
</div>
<div class="embed-container"><button class="embed-button">embed</button></div>
</div>
<div class="chart-outer dead" data-code="dead">
<div class="chart-title">
<h2>Deaths per million inhab</h2>
</div>
<div class="chart-inner">
<div class="chart-container" id="dead_chart"></div>
</div>
<div class="embed-container"><button class="embed-button">embed</button></div>
</div>
<div class="chart-outer dead-per-conf" data-code="dead-per-conf">
<div class="chart-title">
<h2>Fatality rate (%)</h2>
</div>
<div class="chart-inner">
<div class="chart-container" id="dead_per_conf_chart"></div>
</div>
<div class="embed-container"><button class="embed-button">embed</button></div>
</div>
<div class="chart-outer reco-per-conf" data-code="reco-per-conf">
<div class="chart-title">
<h2>Recovery rate (%)</h2>
</div>
<div class="chart-inner">
<div class="chart-container" id="reco_per_conf_chart"></div>
</div>
<div class="embed-container"><button class="embed-button">embed</button></div>
</div>
<div class="chart-outer test" data-code="test">
<div class="chart-title">
<h2>Tests per million inhab</h2>
</div>
<div class="chart-inner">
<div class="chart-container" id="test_chart"></div>
</div>
<div class="embed-container"><button class="embed-button">embed</button></div>
</div>
<div class="chart-outer test-positive" data-code="test-positive">
<div class="chart-title">
<h2>Positive tests rate (%)</h2>
<div class="chart-desc">Confirmed cases on tested population</div>
</div>
<div class="chart-inner">
<div class="chart-container" id="conf_per_test_chart"></div>
</div>
<div class="embed-container"><button class="embed-button">embed</button></div>
</div>
</div>
<div class="modal" id="choose_countries_modal">
<div class="modal-content">
<div class="modal-header">
<div class="title"><h3>Choose countries</h3></div>
<div class="close">×</div>
</div>
<div class="modal-body">
<div class="context-info">
<p>You can choose up to 7 countries for comparison</p>
</div>
<div>
<ul id="active_countries"></ul>
</div>
<div class="form-group" id="menu_add_country"></div>
<br/>
<br/>
</div>
<div class="modal-footer">
<div class="choose-container">
<button class="apply-button">Apply</button>
</div>
</div>
</div>
</div>
<div class="modal" id="about_modal">
<div class="modal-content">
<div class="modal-header">
<div class="title"><h3>About</h3></div>
<div class="close">×</div>
</div>
<div class="modal-body">
<div class="context-info">
<br/>
<p>This website aims to provide a comparison of the COVID-19 pandemic data between countries.</p>
<p>
The comparison is made by aligning every data series by the day that the corresponding country reached 100 confirmed cases (day 0). It also compares confirmed cases by million people and not absolute values. This way we are comparing indicators instead of variables.
<br/> Of course this is not perfect and does not take into account demography or population density, but it is an effort in that direction.
</p>
<p>Data about testing is not easy to get in a usable format, and is not collected for many countries, thus the test charts may be a bit empty.</p>
<!--<p>The always present "10%-5Mppl" data series is a model of a 5 million people country, with 100 confirmed cases on day 0 and a consistent growth of 10% per day. It also has consistent fatality and recovery rates of 5% and 35%. Finally, testing grows 10% per day, starting from 500 on day 0. Useful for comparison purposes.</p>-->
<br/><br/>
<p><b>Sources</b>
<br/>COVID-19 data: <a target="_blank" href="https://github.com/pomber/covid19">Pomber</a>
<br/>Testing data: <a target="_blank" href="https://www.wikidata.org/wiki/Q86901049">Wikidata</a> and <a target="_blank" href="https://github.com/owid/covid-19-data">Our World in Data</a>
<!--<br/>Simulation data: <a target="_blank" href="https://github.com/RemiTheWarrior/epidemic-simulator">epidemic-simulator</a>-->
<br/>Google Mobility data: <a target="_blank" href="https://github.com/cityxdev/covid19GoogleMobilityJSON">CityXDev</a>
<br/>Country and population data: <a target="_blank" href="https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes">lukes</a> and <a target="_blank" href="https://datahub.io/core/population">DataHub.io</a></p>
<br/>
<p>For any questions or suggestions, please contact: [email protected]</p>
<p>This project is open source and source code is available at: <br/><a target="_blank" href="https://github.com/cityxdev/covid19ByCountry">https://github.com/cityxdev/covid19ByCountry</a></p>
</div>
</div>
</div>
</div>
</body>
</html>