Skip to main content
100%

Example Spotify Songs Scatter Plot

✓ Published0🌍 Public
Mmacgregorm01@gmail.com
Last edited Sep 26, 2024
Created on Sep 25, 2024

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 description

The 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.

MIT Licensed

Similar vizzes