Skip to main content
100%

The Margin Convention

✓ Published1🌍 Public
TTroy Marchesseault
Last edited May 15, 2023
Created on May 15, 2023
Forked from Pathetic Bar Chart

This example shows a horizontal bar chart of the ten most populous countries, using UN population data for 2020. The chart applies a standard margin convention using D3’s `scaleBand` for the categorical country names and `scaleLinear` for population counts, rendered as SVG rectangles inside a translated group. The visualization is built with React, which manages the loading state via `useState` and `useEffect`, while D3’s `csv` utility fetches and parses the data before it is sliced and mapped to bars.

AI-generated description

A program that loads in some data about country populations using D3 utilities, and uses React to render the data as a bar chart.

MIT Licensed

Similar vizzes