ICE-7 Resusable Charts
✓ Published3🌍 Public
This example demonstrates a reusable D3 chart library applied to a Spotify song dataset, showing four distinct visualizations: a scatter plot of energy versus danceability, a pie chart of popularity groups, and line and area charts displaying average song popularity by release year. The code constructs each chart as a configurable function with getter/setter methods, using D3 v6 APIs such as `scaleLinear`, `axisBottom`, `axisLeft`, `rollup`, `mean`, `pie`, `arc`, and `area` to compute scales, aggregate data, and generate SVG paths. Charts are rendered into separate SVG elements with custom margins, titles, and axis labels.
AI-generated descriptionMIT Licensed