Skip to main content
100%

CV: Loading CSV Data

✓ Published66🌍 Public
CCurran Kelleher
Last edited Oct 17, 2025
Created on Oct 17, 2025

This example demonstrates how to load and visualize data from a CSV file using React and D3 v7. It renders five circles positioned according to x and y coordinates read from `data.csv`, with interactive click-to-select behavior that highlights the chosen circle. A custom `useContainerDimensions` hook tracks the container size using `ResizeObserver`, while D3's `csv` function parses the data and `scaleLinear` maps data coordinates to screen space. The `join` method efficiently handles circle creation, updating, and removal in the SVG rendering.

AI-generated description
MIT Licensed

Similar vizzes