ClimateQ1
This reusable D3 scatter plot visualizes the relationship between per-capita CO₂ emissions and average temperature across countries, with each circle representing a data point. The chart uses d3.scaleLinear for both axes and d3.scaleOrdinal with d3.schemeTableau10 for color encoding. It includes gridlines, axis labels, and an interactive tooltip that appears on hover. The code defines a configurable scatterPlot function that selects a DOM element, appends an SVG canvas, and renders axes and circles using d3.axisBottom, d3.axisLeft, and standard SVG circle elements.