Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Carbon Emissions of Top 10 Highest GDP Countries

Public visualization

Viewing a saved revision (read-only)

a57dcd22800d4cb3967640053cb7459b

Carbon Emissions of Top 10 Highest GDP Countries

0 stars0🌍 Public
DDipesh
Last edited Apr 26, 2024
Created on Apr 16, 2024

This scatter plot displays the relationship between GDP and CO2 emissions for the ten highest-GDP countries, with each circle colored by country and hover interactions revealing a tooltip with exact values. The visualization uses D3 v7 to load CSV data from a GitHub repository, applies linear scales to map GDP (in trillions) and CO2 emissions, and renders the axes and circles as SVG elements. Tooltip transitions and ordinal color scaling are implemented via d3.scaleOrdinal, and the data is parsed using regex to extract numeric values from formatted strings.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.