Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

TRAVEL VS GDP barGraph

Public visualization

Viewing a saved revision (read-only)

6f34f26c1ed94dd68f7c1a37b44cc98c

TRAVEL VS GDP barGraph

0 stars0🌍 Public
Rrallabandisushen@gmail.com
Last edited Apr 10, 2023
Created on Apr 10, 2023
Forked from barGraph

This visualization combines a bar chart and scatter plot to compare the 2022 population of countries, using a CSV dataset. Bars encode population values on a linear scale, while overlaid blue circles highlight the same data points. Users can sort the countries in ascending or descending order via buttons, with transitions animating the reordering. The code uses D3 v5 APIs including `scaleBand`, `scaleLinear`, `axisLeft`, and `axisBottom`, along with `transition()` and `.attr()` for smooth updates. Tooltips display country names and population on mouseover.

AI-generated description