Activity6_Question_4
✓ Published0🌍 Public
This bubble chart compares the fiber and protein content of different foods, with each bubble's size representing serving size and color indicating the food group. The visualization directly maps Fiber intake on the x-axis and Protein on the y-axis, using `d3.scaleLinear` for positions and bubble radius, and `d3.scaleOrdinal` for categorical coloring. Interactive tooltips, powered by D3’s `.on('mouseover')` and a `.transition()`, display exact values. The chart is rendered as SVG via `d3.select('#my_dataviz').append('svg')`, with data loaded from a CSV using `d3.csv`.
AI-generated descriptionMIT Licensed