Skip to main content
100%

Fork of Food Scatter Plot with React & D3

✓ Published1🌍 Public
RRyan Offstein
Last edited Sep 23, 2025
Created on Sep 23, 2025

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 description
MIT Licensed

Similar vizzes