Fork of Akhil -vizhub assignment bat-scatter
✓ Published0🌍 Public
This example visualizes the relationship between car type and total price using a bar chart, with horizontal bars showing aggregated price sums per car category. The code uses React state and effects to load CSV data via D3’s `csv` method, then aggregates prices by car type with a reduce operation. D3’s `scaleBand` and `scaleLinear` map the categorical types and continuous price values, while `axisBottom` and `axisLeft` render the axes. The SVG rendering approach positions bars and labels, with title text annotating the chart. Data comes from a cleaned cars dataset hosted in a GitHub gist.
AI-generated descriptionMIT Licensed