Skip to main content
100%

Fork of CV: Loading CSV Data

✓ Published0🌍 Public
AAparna Desi Reddy
Last edited Feb 28, 2026
Created on Feb 28, 2026

This example demonstrates loading CSV data in a React application and rendering interactive circles in an SVG. It uses d3.csv to fetch data.csv, mapping string values to numbers for the id, x, and y fields. The d3.scaleLinear function scales the x and y coordinates to fit the container’s dimensions, which are tracked via a ResizeObserver. The circles are redrawn with d3’s join method, responding to click events by toggling a selected circle’s fill color between white and black, managed through React state.

AI-generated description
MIT Licensed

Similar vizzes