Skip to main content
100%

Avocados Scatter Plot

✓ Published1🌍 Public
Jjons288
Last edited Sep 12, 2018
Created on Sep 12, 2018
Forked from Cars Scatter Plot

This scatter plot visualizes the relationship between the average price and total volume of avocados sold weekly from 2016 to 2018, with each point colored by year using a d3.scaleOrdinal legend. The chart loads data from a CSV file via d3.csv, converts numeric fields, and renders SVG circles positioned by d3.scaleLinear scales. Axes are generated with d3.axisLeft and d3.axisBottom, including tick lines and custom axis labels, while the legend is manually drawn as rectangles and text within the SVG.

AI-generated description

This 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

Similar vizzes