Cars Scatter Plot
✓ Published1🌍 Public
This scatter plot shows the relationship between the total weekly volume of avocados sold and their average price, with each point colored by year from 2016 to 2018. The data comes from the Hass Avocado Board via Kaggle. Using d3.scaleLinear for both axes and d3.scaleOrdinal for color encoding, the code renders SVG circles with opacity, includes axis labels and a title, and adds a legend using nested SVG groups. Both axes use d3.axisBottom and d3.axisLeft with tick lines.
AI-generated descriptionThis plot shows the average cost of an avocado vs the total volume of avocados sold every week from 2016 to 2018, from Hass Avocado Board.
Thanks to Weijie Pang for the Legend code
MIT Licensed