Skip to main content
100%

Scatter Plot for the Diamond Data Set

✓ Published0🌍 Public
KKevin Raj
Last edited Mar 18, 2023
Created on Mar 18, 2023

This scatter plot visualizes the relationship between diamond carat and price, with each point colored by cut quality (Fair, Good, Very Good, Premium, Ideal). The code loads a CSV dataset from a GitHub gist and renders SVG circles using D3 v6’s `select`, `scaleLinear`, `extent`, `axisLeft`, and `axisBottom`. Axes labels for “Diamond_Carat” and “Diamond_Price” are appended as text elements, with a color mapping function defining per-cut hues.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes