Skip to content

Commit c926de9

Browse files
authored
Add files via upload
1 parent b3deb5b commit c926de9

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

visualization.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
5+
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
6+
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
7+
</head>
8+
<body>
9+
<div id="vis"/>
10+
<script>
11+
const spec = {
12+
"data": {"url": "https://data.csaladen.es/songs_and_popularity.csv"},
13+
"layer": [
14+
{
15+
"mark": {"type": "boxplot", "size": 3},
16+
"width": 150,
17+
"height": 100,
18+
"encoding": {
19+
"x": {"field": "ReleasedYear", "type": "temporal"},
20+
"y": {
21+
"field": "LyricalContent",
22+
"type": "quantitative",
23+
"aggregate": "median"
24+
}
25+
}
26+
},
27+
{
28+
"mark": {"type": "line", "size": 3, "color": "red"},
29+
"width": 150,
30+
"height": 100,
31+
"encoding": {
32+
"x": {"field": "ReleasedYear", "type": "temporal"},
33+
"y": {
34+
"field": "LyricalContent",
35+
"type": "quantitative",
36+
"aggregate": "median"
37+
}
38+
}
39+
}
40+
],
41+
"config": {}
42+
};
43+
vegaEmbed("#vis", spec, {mode: "vega-lite"}).then(console.log).catch(console.warn);
44+
</script>
45+
</body>
46+
</html>

0 commit comments

Comments
 (0)