Dataviz 2018 - 3. Bar Chart - D3 CSV Data Import, Data Joins, Scales, Margin Convention, Axes - Ep7
✓ Published1🌍 Public
MMinwoo Pak
Last edited Jun 16, 2021
Created on Jun 15, 2021
This example shows a horizontal bar chart of population estimates for ten countries, imported from a local CSV file. It demonstrates core D3 v7 techniques including `d3.csv()` for tabular data import, data joins via `selectAll().data().enter()`, and `scaleLinear` and `scaleBand` for positioning. The margin convention establishes an inner plotting area, and axes are added using `axisLeft` and `axisBottom`. The chart renders as SVG with steelblue rectangles, and population values are scaled by 1,000 during preprocessing.
AI-generated descriptionMaking a Bar Chart:
Tabular data import using d3.csv() Data Joins Scales (Linear, Band) The Margin Convention Adding Axes
MIT Licensed