-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
55 lines (50 loc) · 2 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
<!DOCTYPE html>
<head>
<title>Indonesia covid-19 case summary</title>
<meta name="twitter:card" content="summary_large_image">
</meta>
<meta property="og:title" content="Indonesia covid-19 case summary" />
<meta property="og:url" content="https://nuharaf.github.io/index.html" />
<meta property="og:description" content="Grafik perkembangan kasus covid-19 per provinsi" />
<meta property="og:image" content="https://raw.githubusercontent.com/nuharaf/nuharaf.github.io/master/preview.png" />
<meta charset="utf-8">
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>
</head>
<body>
<h1>Indonesia Covid-19 Case</h1>
<p>Chart generated using <a href="https://github.com/nuharaf/indonesia-covid19">this</a> notebook</p>
<p>Page served from <a href="https://github.com/nuharaf/nuharaf.github.io">this</a> repository </p>
<br>
<p>Click on the province bar-chart to filter the line-chart. Hold shift for multiple selection</p>
<section id="positive">
<h2>Positive</h2>
<div id="vis_positive"></div>
</section>
<section id="recover">
<h2>Recover</h2>
<div id="vis_recover"></div>
</section>
<section id="dead">
<h2>Dead</h2>
<div id="vis_dead"></div>
</section>
<script>
const spec = "indonesia_covid.json";
const recover_spec = "indonesia_covid_recover.json";
const dead_spec = "indonesia_covid_dead.json";
vegaEmbed("#vis_positive", spec)
// result.view provides access to the Vega View API
.then(result => console.log(result))
.catch(console.warn);
vegaEmbed("#vis_recover", recover_spec)
// result.view provides access to the Vega View API
.then(result => console.log(result))
.catch(console.warn);
vegaEmbed("#vis_dead", dead_spec)
// result.view provides access to the Vega View API
.then(result => console.log(result))
.catch(console.warn);
</script>
</body>