HTML Starter
✓ Published0🌍 Public
A scatter plot of video-game sales, Metacritic scores, and playtime uses D3 v7’s `d3.scaleLinear`, `d3.scaleOrdinal`, and `d3.scaleSqrt` to map copies sold and score to x/y positions, genre to Tableau-10 hue, and average playtime to circle area. Minecraft receives a distinct highlight color. Data loads from a CSV via `d3.csv`, with axes built by `d3.axisBottom` and `d3.axisLeft`. The SVG rendering is generated in `chart.js` within an `index.html` shell.
AI-generated descriptionHW5 – Marks and Channels: Video Game Sales, Scores & Playtime
A D3 v7 scatter plot that encodes three quantitative dimensions and one categorical dimension of a video-game dataset.
Channels used
| Channel | Field |
|---|---|
| X position | copies_sold_millions |
| Y position | metacritic_score |
| Hue (colour) | genre (ordinal, Tableau-10 palette) |
Area (radius via scaleSqrt) |
avg_playtime_hours |
Minecraft (best-selling title) receives a one-off highlight colour so it is immediately identifiable.
Files
| File | Purpose |
|---|---|
index.html |
Page shell, styles, SVG container |
chart.js |
All D3 logic – data loading, scales, axes, marks, legend |
MIT Licensed