-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
36 lines (35 loc) · 864 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>
</head>
<body>
<div id="vis"></div>
<script>
const spec = {
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {
"url": "data/building_inventory.csv"
},
"mark": "bar",
"encoding": {
"x": {
"field": "Year Acquired",
"type": "ordinal",
"title": "Year Acquired"
},
"y": {
"aggregate": "count",
"type": "quantitative",
"title": "Count"
}
}
};
vegaEmbed('#vis', spec)
.then((result) => console.log(result))
.catch(console.error);
</script>
</body>
</html>