generated from usf-cs360-spring2020/template-bulma
-
Notifications
You must be signed in to change notification settings - Fork 1
/
genre_map_proto.html
246 lines (210 loc) · 12.5 KB
/
genre_map_proto.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
235
236
237
238
239
240
241
242
243
244
245
246
<!--
Copyright 2018 The Distill Template Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<head>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Music Atlas</title>
<script src="https://distill.pub/template.v2.js"></script>
<!-- <script src="template.v2.js"></script> -->
<!-- Load Font Awesome 5 (free) icons -->
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
<!-- d3 -->
<script src="https://d3js.org/d3.v5.min.js"></script>
<!-- local scripts -->
<script src="assets/js/helpers.js"></script>
<script src='assets/js/hover.js'></script>
</head>
<body>
<nav class="navbar" role="navigation" aria-label="main navigation">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel='stylesheet' href='assets/css/navbar.css'></link>
<div class="container">
<div class="navbar-brand">
<a class="navbar-item" href="index.html">
<span class="icon"><i class="fas fa-home"></i></span>
<span>Home</span>
</a>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="main-menu">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="main-menu" class="navbar-menu has-text-weight-medium">
<!-- Left navbar items -->
<div class="navbar-start">
<!-- The data icon -->
<a class="navbar-item" href="dataset.html" title="Data">
<span class="icon"><i class="fas fa-table"></i></span>
<span>Data</span>
</a>
<!-- prototypes -->
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
Prototype
</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="genre_map_proto.html" title="Genre Map Prototype">
<span class="icon"><i class="fas fa-paint-brush"></i></span>
<span>Genre Map</span>
</a>
<a class="navbar-item" href="playlist_relationships_map_proto.html" title="Playlist Relationships Map Prototype">
<span class="icon"><i class="fas fa-paint-brush"></i></span>
<span>Playlist Relationships Map</span>
</a>
<a class="navbar-item" href="artist_sound_progression_proto.html" title="Artist Sound Progression Map Prototype">
<span class="icon"><i class="fas fa-paint-brush"></i></span>
<span>Artist Sound Progression Map</span>
</a>
</div>
</div>
<!-- visualizations -->
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
Visualizations
</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="genre_map.html" title="Genre Map">
<span class="icon"><i class="fas fa-paint-brush"></i></span>
<span>Genre Map</span>
</a>
<a class="navbar-item" href="playlist_relationships_map.html" title="Playlists Relationships Map">
<span class="icon"><i class="fas fa-paint-brush"></i></span>
<span>Playlists Relationships Map</span>
</a>
<a class="navbar-item" href="artist_sound_progression.html" title="Artist Sound Progression Map">
<span class="icon"><i class="fas fa-paint-brush"></i></span>
<span>Artist Sound Progression Map</span>
</a>
</div>
</div>
</div>
<!-- Right navbar items -->
<div class="navbar-end">
<!-- TODO: Update as needed -->
<a class="navbar-item" href="about.html" title="About">
<span class="icon"><i class="fas fa-info-circle"></i></span>
<span>About</span>
</a>
</div>
</div>
</div>
</nav>
<!-- End page navigation -->
<d-title>
<h1 style='text-align: center;'>The Genre Map</h1>
</d-title>
<d-article>
<!-- <a class="marker" href="#section-1" id="section-1"><span>1</span></a> -->
<d-figure id='genre_proto' style='grid-column: screen; margin: 0rem 2rem;'>
<link rel="stylesheet" href='assets/css/genre_map.css'></link>
<!-- <div id='genre_proto' style='margin: auto;'>
</div> -->
</d-figure>
<script src='assets/js/genre_map_proto.js'></script>
<h2>Do "genre-superclusters" exist among the top 50 music genres?</h2>
<p>In the prelude, I mentioned that music streaming services upload approximately 50k new tracks every day <d-cite key='ingham_2020'></d-cite>.
Naturally, we might think this would resolve the "stale playlist problem" <d-footnote>
Have you ever created a playlist you absolutely loved that eventually got boring? If so, then you've experienced the "stale playlist problem".
It can occur when you listen to the same tracks you love over and over again, causing your tracks to "go stale". The stale playlist problem is
common in the modern music streaming era.</d-footnote>. But, unintuitively, this is not the case: the sheer size of
music streaming databases can be overwhelming. Where do you begin to look for new artists/albums/tracks without spending a considerable amount of
time sorting through the noise? Is this even possible? It probably feels like it isn't if you don't know the scope of the music space you're in.
This is where "Music Atlas" can be useful: it enables you to visualize the Musical Universe <d-footnote>My hope is that Music Atlas empowers you to discover both new and familiar "music galaxies" that interest you.</d-footnote>.
</p>
<p>There is a cosmological theory that the Universe has structure on all scales from moons, planets, and stars, to individual galaxies, to clusters of galaxies, to superclusters, and so on without end <d-footnote>This is actually a theory, not a fact. The theory is called hierarchical cosmology.</d-footnote>.
Under this theory, the Musical Universe must have structure on all scales too: from tracks, albums, and artists, to individual "genre galaxies", to clusters of genre galaxies (i.e., "genre galaxy clusters"), to "genre-superclusters", and so on.
</p>
<p>To resolve the stale playlist problem, the first step is get an idea of the scale of the Musical Universe. To this end, I created a map (i.e., force-directed graph) of the largest 50 genre galaxies in the Musical Universe.
The map can help us answer the question: do genre-superclusters exist among the top 50 music genres on Spotify? Can you find any?
</p>
<p>Read my answer
<d-footnote>Genre-superclusters do appear to exist among the top 50 music genres, and some are more apparent than others.
For example, hip hop, gangster rap, trap, and rap may be a genre-supercluster. The same can be said for pop, dance pop, and post-teen pop. I could name several others, but rather than spoiling the fun of discovering the unknown, I'll let you find them yourself.
</d-footnote>.
</p>
<h3>How is this map encoded?</h3>
<p>Nodes are encoded as circles. Each node is either a track (gray) or genre (colored). For genre nodes, color (ranging sequentially from red-yellow-blue) encodes the number of incoming links (i.e. in degrees). More significant (or connected) genres are more bluish while less significant genres are more redish or yellowish (like how hotter stars emit a bluish color while cooler stars emit a redish or yellowish color).</p>
<h3>Is the map interactive?</h3>
<p>Yes! Hover over any node to see its name and connections. You can also grab (i.e., click and drag) nodes to see how they affect the graph layout.
Future releases may incorporate filtering and more details-on-demand. Stay tuned!
</p>
<!-- <h3>Feedback Recieved and Future Work</h3>
<p>One reviewer reported that the graph did not render when they tried to view it. I suspect this was not a bug but rather caused by the large size of the data, causing the view to leave the page before the graph finished rendering.
D3's force-directed-graph function is computationally expensive (particularly when large data is used) because node positions are recalulated every clock tick.
To this end, I asked if there were any methods that could speed up the rendering time without compromising position quality in the graph. Professor Engle suggested
<a href="https://www.twosixlabs.com/faster-force-directed-graph-layouts-by-reusing-force-approximations/">d3-force-reuse</a>, which I integrated into my final visualization.
The improvement is made by approximating the Barnes-Hut values. It does this by reusing approximations instead of computing new ones at each iteration of the layout algorithm.
</p> -->
</d-article>
<d-appendix>
<h3>Acknowledgments</h3>
<p>
<a href="https://observablehq.com/@d3/force-directed-graph">Mike Bostock's D3 force-directed graph example</a><br/>
<a href="http://bl.ocks.org/sjengle/f6f522f3969752b384cfec5449eacd98">Sophie Engle's Graph Demo's</a><br/>
</p>
<h3>Contributions</h3>
<p>
All work was complete by Kai unless noted otherwise.
</p>
<h3>Feedback Recieved and Future Work</h3>
<p>One reviewer reported that the graph did not render when they tried to view it. I suspect this was not a bug but rather caused by the large size of the data, causing the view to leave the page before the graph finished rendering.
D3's force-directed-graph function is computationally expensive (particularly when large data is used) because node positions are recalulated every clock tick.
To this end, I asked if there were any methods that could speed up the rendering time without compromising position quality in the graph. Professor Engle suggested
<a href="https://www.twosixlabs.com/faster-force-directed-graph-layouts-by-reusing-force-approximations/">d3-force-reuse</a>, which I integrated into my final visualization.
The improvement is made by approximating the Barnes-Hut values. It does this by reusing approximations instead of computing new ones at each iteration of the layout algorithm.
</p>
<d-bibliography src="bibliography.bib"></d-bibliography>
</d-appendix>
<footer class="footer">
<div class="content has-text-centered is-size-7">
<p>
<a href="#top">
<span class="fas fa-arrow-up"></span>
<span class="has-text-weight-medium">Back to Top</span>
</a>
</p>
<p>
<!-- TODO: Change to link to your Github repository -->
<a href="https://github.com/krmiddlebrook" class="button is-small" style="padding-left: 1em; padding-right: 1em;">
<i class="fab fa-github-alt"></i> <strong>Github</strong>
</a>
<a href="https://fontawesome.com/" class="button is-small" style="padding-left: 1em; padding-right: 1em;">
<i class="fab fa-font-awesome"></i> <strong>FontAwesome</strong>
</a>
<a href="https://bulma.io" class="button is-small">
<img src="https://bulma.io/images/made-with-bulma--semiblack.png" alt="Made with Bulma" width="128" height="24">
</a>
</p>
</div>
</footer>
<!-- End page footer -->
<!-- Mobile menu responsiveness -->
<!-- https://bulma.io/documentation/components/navbar/ -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
if ($navbarBurgers.length > 0) {
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
const target = el.dataset.target;
const $target = document.getElementById(target);
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
}
});
</script>
</body>