Skip to main content
100%

Loading and Parsing CSV Data

✓ Published3🌍 Public
Ssaeedtajikai
Last edited Feb 27, 2020
Created on Feb 19, 2020

This example shows a horizontal bar chart of country populations, using a CSV file loaded from `data.csv` with the `d3.csv` method. It renders SVG bars with lengths scaled linearly by population and countries positioned on a band scale. The code explicitly constructs axes with `axisLeft` and `axisBottom`, and applies margins and scales from `d3.scaleLinear` and `d3.scaleBand`. Population values are converted to numbers after loading.

AI-generated description
MIT Licensed

Similar vizzes