{"version":"1.0","type":"rich","title":"Data Joins","description":"This example demonstrates D3 data joins by binding a dataset of country-weight pairs to SVG elements across two canvases. It starts by selecting and restyling existing rectangles with D3’s `select` and `attr`, then appends circles manually before using `data()` and `join()` to automatically create new circles mapped from the array’s `size` and `weight` values. The code also shows data transformation with `forEach`, grouping countries into weight arrays, and renders everything as SVG in a React setup using D3 v7.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/007179f829c64c86bb8b929f12186581?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}