Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored Bar Chart

Public visualization

Viewing a saved revision (read-only)

d5f12d06ab0e43ce8d466d872f3b102c

Refactored Bar Chart

0 stars1🌍 Public
RRedSorrel
Last edited Sep 20, 2021
Created on Sep 20, 2021

This visualization presents a horizontal bar chart comparing the 2020 populations of ten countries, sourced from UN World Population Prospects data on GitHub. Built with React and D3 v7, it renders SVG marks using scales: `scaleBand` positions countries along the y-axis, while `scaleLinear` maps population values to bar widths. The chart explicitly defines reusable components for axes and marks, with `AxisBottom` generating ticks and `AxisLeft` labeling country names, all within a fixed viewport. The data loads asynchronously via `csv`, showcasing a clean, modular refactoring approach.

AI-generated description

A program that loads in some data about World Population Prospects from the UN.