🌍 Public
Viewing a saved revision (read-only)
1c79ce599eb0436083c1d50874bc52f2
ICE-6_PY_DATA_VIZ: Rendering Marks and Channel w/React
This example shows a horizontal bar chart comparing the horsepower of ten cars, using SVG marks and channels rendered through React components. It imports data from a CSV file with d3.csv, then uses d3.scaleBand and d3.scaleLinear to map car names and horsepower values to screen positions. The code generates axis ticks and gridlines manually with JSX, while React’s useState and useEffect manage asynchronous data loading. D3 v5 and React 16.13.1 work together to produce the visualization.
AI-generated descriptionReact Starter code.