Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored Bar Chart

Public visualization

Viewing a saved revision (read-only)

5e0f281f728e4621b44c0504022d9bb0

Refactored Bar Chart

0 stars1🌍 Public
Kkbrookshire420
Last edited May 8, 2022
Created on May 8, 2022

A refactored bar chart visualizes the populations of the ten most populous countries in 2020. The chart uses React state via a custom hook to manage data loading, while D3.js utilities handle scaling and drawing. SVG rendering with `scaleBand` and `scaleLinear` positions horizontal bars, with axes and marks split into separate components. Population data comes from a UN CSV file fetched using D3's `csv` function.

AI-generated description

A program that loads in some data using d3 utilities, and uses react state to keep track of the data.