🌍 Public
Viewing a saved revision (read-only)
2f3e56026a164e009210a932e8cea1c0
Activity-6 Q.3.6
This example displays a scatter plot of buyer data, showing the relationship between the number of reviews and the price of products, with points colored by genre (positive or negative). The visualization uses D3 v7 to fetch a CSV file from a GitHub Gist, parse it, and render the points as SVG circles. D3’s scaleLinear functions map the data values to pixel coordinates, while d3.axisBottom and d3.axisLeft create the labeled axes. A simple legend, built using D3’s data join, indicates the categorical color mapping via scaleOrdinal.
AI-generated description