Making a Bar Chart
✓ Published0🌍 Public
This example renders a horizontal bar chart that displays the count of speakers per dialect from the Spoken BNC2014 dataset, loaded from a CSV file. The visualization uses D3 version 5, with `select` to target the SVG, `csv` to parse the data, `scaleLinear` and `scaleBand` to map values to positions, and `axisLeft` and `axisBottom` to draw the axes. Bars are appended as SVG `rect` elements, with lengths scaled by speaker count and styled via a CSS class.
AI-generated descriptionThis bar chart shows the composition of speakers' dialects in the Spoken BNC2014. The data comes from Lancaster University.
MIT Licensed