Gist abb23fbc4206b807459d7711ee808a11
✓ Published0🌍 Public
Aandyreagan
Last edited Sep 26, 2018
Created on Sep 26, 2018
This example visualizes a personal food diary from a CSV file, showing each meal as a node in a force-directed graph. The chart uses d3.forceSimulation to position nodes by meal type and date, with node size reflecting the portion size recorded in the data. It renders the network using D3’s SVG capabilities, drawing links between consecutive meals to reveal temporal patterns. The code reads the `food.csv` data with d3.csv, parses the Date and Meal fields, and applies a custom color scale to distinguish breakfast, snacks, and other meal categories.
AI-generated description