Reusable Scatter Plot
This visualization explores global city energy and demographic data using a reusable D3 scatter plot component. It displays cities as colored symbols (triangles, squares, diamonds, circles) based on their renewable energy adoption, with a legend categorizing values from low to very high. The example animates by cycling the X-axis through population, temperature, CO2 emissions, and renewable energy percentage every three seconds, while the Y-axis remains electricity consumption. The code imports D3 v6 modules via `select`, `text`, `csvParse`, `scaleLinear`, `axisLeft`, `axisBottom`, and `symbol` to build the custom SVG visualization, reading data from a gist-hosted CSV.