Fork of Food Scatter Plot with React & D3
✓ Published1🌍 Public
This example plots foods from a USDA Foundation Foods dataset on a log-log scatter plot, comparing carbohydrate and protein content in grams. The React app loads the data with d3.json, then formats nutrient amounts before passing them to a reusable D3 visualization function. The viz module applies d3.scaleLog for both axes, draws axes with d3.axisBottom and d3.axisLeft, and renders food items as steelblue circles. The chart filters out non-positive nutrient values to accommodate the logarithmic scale.
AI-generated descriptionMIT Licensed