Skip to main content
100%

Diamonds

✓ Published0🌍 Public
Mmbostock
Last edited Feb 12, 2020
Created on Dec 23, 2015

This scatter plot displays the relationship between diamond mass in carats and price in US dollars. The visualization uses a canvas overlay to draw semi-transparent blue circles that accumulate over time, creating a density effect where overlapping points become darker. A static SVG layer renders the grid and axes, with the x-axis labeled "Mass (carats)" and the y-axis labeled "Price (US$)". The code uses d3.tsv to load the data, d3.scaleLinear for both axes, and d3.axisLeft and d3.axisBottom for the grid and ticks. The data is shuffled and drawn progressively in batches of 500 using a d3.timer, with the canvas context employing a "multiply" composite operation to blend overlapping points.

AI-generated description
gpl-3.0 Licensed

Similar vizzes