Skip to main content
100%

Food Project work

✓ Published0🌍 Public
RRyan Offstein
Last edited Oct 19, 2025
Created on Sep 23, 2025

This example displays a scatterplot of food items from a USDA Foundation Foods dataset, comparing carbohydrate content on the x-axis against protein on the y-axis. The visualization uses logarithmic scales to accommodate the wide range of values across foods like hummus, black beans, and peanut butter. Built with React and D3 v7, the code handles data filtering and axis rendering through the `scaleLog`, `axisBottom`, and `axisLeft` APIs. Circles are positioned using the `selectAll` join pattern within the `viz.js` module, with labels and tick styling configured through attributes.

AI-generated description
MIT Licensed

Similar vizzes