Skip to main content
Public

Share visualization

Loading preview…

UN Population Data with React & D3

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

UN Population Data with React & D3

0
KKIRRAN P L
Last edited Dec 6, 2023
Created on Dec 3, 2023

This example displays the top 10 most populous countries from a UN Population 2019 dataset as a horizontal bar chart, with axes and tick labels rendered in SVG. The code loads CSV data using the D3 `csv` utility, then scales the country names with `scaleBand` and population values with `scaleLinear`. React manages the component state and rendering, while D3’s axis ticks and layout functions generate the visual elements. The chart updates dynamically after data fetching, showing loading text until the data arrives.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!

Comments

Sign in to join the discussion.

MIT Licensed