Skip to main content
100%

Fork of Akhil -vizhub assignment bat-scatter

✓ Published0🌍 Public
MM
Last edited Mar 18, 2024
Created on Mar 18, 2024

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 description
MIT Licensed

Similar vizzes