Skip to main content
100%

The Margin convention

✓ Published1🌍 Public
NNana Kwame
Last edited Aug 21, 2023
Created on Aug 21, 2023

This chart displays the 2020 populations of ten countries as a horizontal bar chart, with the bars arranged vertically by country. The chart uses a margin convention to separate the plotting area from the SVG’s edges, translating a `<g>` element by the top and left margin values. Built with React and D3 v7, it uses `d3.csv` to load data from the World Population Prospects 2022, then `d3.scaleBand` for the y-axis and `d3.scaleLinear` for the x-axis. The visualization renders as an SVG, with each bar drawn as a `rect` element.

AI-generated description

A program that loads in some data from World Population Prospects 2022 using D3 utilities, uses React and D3 to render the data as a pathetic barchat.

MIT Licensed

Similar vizzes