Scatter Plot Cereals
✓ Published0🌍 Public
A scatter plot displays the relationship between sugar and sodium content for a random selection of 35 cereals, with points colored by their overall rating. Ratings from 18-39 appear red, 40-59 orange, 60-100 green, and all others blue. The visualization loads CSV data from a GitHub gist using `d3.csv`, scales axes with `d3.scaleLinear`, and renders circles as SVG elements with `select` and `join`. Axis labels and a legend explain the color coding, while tick text is styled at 20 pixels for readability.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed