-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
124 lines (89 loc) · 4.53 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:creator" content="@jetforme" />
<meta name="twitter:title" content="COVID-19 Data" />
<meta name="twitter:description" content="Simple interactive chart of COVID-19 cases over time." />
<meta name="twitter:image" content="hero.png" />
<meta property="og:url" content="https://latencyzero.github.io/COVID/" />
<meta property="og:title" content="COVID-19 Data" />
<meta property="og:description" content="Simple interactive chart of COVID-19 cases over time." />
<meta property="og:image" content="hero.png" />
<title>COVID-19 Data</title>
<link rel="stylesheet"href="c3.css" type="text/css">
<link rel="stylesheet" href="main.css" type="text/css">
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="https://d3js.org/d3-dsv.v1.js"></script>
<script src="c3.js"></script>
<script src="d3-fetch.v1.js"></script>
<script src="https://unpkg.com/d3-simple-slider"></script>
<script src="vis.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-34369394-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-34369394-2');
</script>
</head>
<body class="with-3d-shadow with-transitions">
<div class="header">
<h1>COVID-19 <span id="activity" style="font-size: 0.8em; color: #888">Loading…</span></h1>
</div>
<div class="controls">
<label for="regions">Regions:</label>
<select id="regions" onchange="addRegionByID(this.options[this.selectedIndex].value)">
<option>-- Select Region to Add --</option>
</select>
<label for="states">States:</label>
<select id="states" onchange="addStateByID(this.options[this.selectedIndex].value)">
<option>-- Select State to Add --</option>
</select>
<label for="filters">Filters:</label>
<select id="filters" onchange="addByFilterID(this.options[this.selectedIndex].value)">
<option>-- Add by Filter --</option>
</select>
<button onclick="clearAll()">Clear All</button>
<div id="minDate" style="display: inline-block"></div>
</div>
<div id="tags1"></div>
<div class="charts">
<h2>Daily Cases per Capita</h2>
<div id="dailyCasesPerCapita" style="width: 100%; height: 400px;"></div>
<h2>Daily Cases</h2>
<div id="dailyCases" style="width: 100%; height: 400px;"></div>
<h2>Daily Deaths</h2>
<div id="dailyDeaths" style="width: 100%; height: 400px;"></div>
<h2>Cases per Capita</h2>
<div id="casesPerCapita" style="width: 100%; height: 400px; margin-top: 2em;"></div>
<h2>Deaths as a Percentage of Cases</h2>
<div id="deathPercentages" style="width: 100%; height: 400px;"></div>
<h2>Cases</h2>
<div id="cases" style="width: 100%; height: 400px; margin-top: 2em;"></div>
<h2>Deaths</h2>
<div id="deaths" style="width: 100%; height: 400px;"></div>
</div>
<div class="footer">
<h3>Notes</h3>
<p>China’s numbers are likely <a href="https://www.bloomberg.com/news/articles/2020-04-01/china-concealed-extent-of-virus-outbreak-u-s-intelligence-says">fake.</a></p>
<p>Add regions or states from their respective menus. Remove individual ones by clicking × next to the name at the bottom of the page.
Turn regions on and off in each chart by clicking the name in the respective chart legend. Report <a href="https://github.com/latencyzero/COVID/issues/" target="_blank">bugs</a>.</p>
<p>This pure-javascript page loads data from the Johns Hopkins Github <a href="https://github.com/CSSEGISandData/COVID-19" target="_blank">repo</a>
and the <a href="https://covidtracking.com">COVID Tracking Project</a>. <a href="https://github.com/latencyzero/COVID" target="_blank">Fork this</a>.</p>
<p>
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/" target="_blank"><img alt="Creative Commons License" style="border-width:0; margin-right: 0.5em;" src="https://i.creativecommons.org/l/by-nc/4.0/80x15.png"></a>
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">COVID-19 Charts</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://latencyzero.github.io/COVID/" property="cc:attributionName" rel="cc:attributionURL" target="_blank">Latency: Zero, LLC</a>
is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/" target="_blank">Creative Commons Attribution-NonCommercial 4.0 International License</a>.
</p>
</div>
<script>
if (checkFrame())
{
loadData();
}
</script>
</body>
</html>