Exploring survey data interactively - new join() version
This interactive bar chart explores survey data, allowing the user to dynamically select which variables to plot on both the x- and y-axes via dropdown menus. The visualization demonstrates the D3 v5 general update pattern using the new `join()` method, which handles entering, updating, and exiting bars based on user input. The scales, axes, and bar heights update accordingly, with data nested and aggregated by the selected variable. The code uses `d3.nest()`, `d3.mean()`, `d3.axisBottom`, and `d3.axisLeft` to render the SVG chart.