Exploring survey data interactively - new join() version
This interactive bar chart uses the D3.js v5 join() method to dynamically explore relationships between variables in a survey dataset. Users select variables from two dropdown menus, which updates the x-axis categories and y-axis values (including averages for stress, height, and expenses). D3’s scaleBand and scaleLinear redraw the bars and axes on each selection, while the data is transformed via nest(), rollup(), and mean() before rendering as SVG. The underlying JSON data is loaded asynchronously using d3.json().