Example Spotify Songs Scatter Plot
This scatter plot maps 50 mock Spotify songs, with energy on the x-axis and popularity on the y-axis, while point color encodes valence using a three-shade blue palette. Both scales are constructed with `d3.scaleLinear` and `d3.extent`, and axes are rendered via the `@mjmacgregor/axis-labels` helper library for labeled ticks. The visualization is rendered as SVG circles with opacity, and the underlying data is generated randomly using `Math.random()` in the main script, mimicking song attributes without a real dataset.
AI-generated descriptionThe following pseudo-visualization uses mock data generated by using Math.random().
The vertical position corresponds to the song's quantified 'popularity' and the horizontal position corresponds to its 'energy' level.
The color of the point pertains to the song's valence -- the darkest shade is the lowest valence and the lightest shade is the highest valence.