Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Spotify Music Dataset Loading Data

Public visualization

Viewing a saved revision (read-only)

61bee519b4ba4e898e257e4c443bae85

Spotify Music Dataset Loading Data

0 stars0🌍 Public
JJose Morales
Last edited Sep 4, 2025
Created on Sep 3, 2025
Forked from Loading Data

This example loads a Spotify music dataset and displays the first 500 entries as raw JSON text in a `pre` element. The visualization uses a state machine to sequentially render three states: `undefined`, `'LOADING'`, and the parsed data array. It fetches `data.csv`, parses it with `d3.csvParse`, and converts `track_popularity` and `duration_ms` to numbers. Each state transition triggers a re-render via the D3 `select` and `.join` pattern, showing how asynchronous data loading can be handled transparently with D3 v7.

AI-generated description