Bar Chart - React & D3 (Part 24) - Stylised
✓ Published4🌍 Public
TTom-S82
Last edited Sep 16, 2020
Created on Sep 16, 2020
This interactive bar chart displays the top countries by estimated UN population for a selected year, with the number of countries adjustable via dropdowns. The bars are color-coded by continent and stylized with gradient fills and drop shadows. The visualization uses React for state management and component rendering, while D3 v5 handles data loading (via `csv`), scaling (`scaleBand`, `scaleLinear`), and axis generation. Population values are loaded from a CSV file and formatted using D3’s `format` function.
AI-generated descriptionA program that creates a bar chart based on estimated UN Population levels.
Extras:
- Dynamic Selection
- Select any year between 1950 and 2020
- Select a variable number of countries to return
- The continents of the countries are drawn in different colors to show how the global population is roughly distributed
- Bars formatted to look 3D and border effects (as per the previous fork)
Potential Improvements for later:
- Formatted tooltip on multiple lines
- Animation when the dropdowns are selected rather than only happening on initial loading
Tutorials:
Other Documentation:
MIT Licensed