🌍 Public
Viewing a saved revision (read-only)
6351499ff3d744f3a2e365e212f7d690
TRAVEL VS GDP 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