{"version":"1.0","type":"rich","title":"D3 Grouped Selections","description":"This example demonstrates a grouped selection pattern in D3, where the top 10 countries by population from the UN population estimates dataset are rendered as SVG groups, each containing a bar and a text label. The visualization shows a bar chart with country names on the x-axis and population values on the y-axis, using `d3.scaleBand` and `d3.scaleLinear`. The core technique uses `.selectAll('g.mark').join()` with an enter function that appends both a `rect` and `text` element per group, then updates their attributes via nested `.select()` calls. The code imports from `d3` and uses the `@curran/responsive-axes` library for axis handling.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/2febebcc300f48328651902c8fd1870c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}