Skip to main content
Public

Share visualization

Loading preview…

one

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

one

1
Mmuchakurthisahithipatel@gmail.com
Last edited Nov 10, 2025
Created on Nov 10, 2025
Forked from D3 Starter

This interactive world map visualizes renewable energy usage and CO₂ emissions for 12 major countries in 2024. Users toggle between the two metrics via buttons, triggering smooth color transitions across the geography. The visualization uses d3.geoNaturalEarth1 projection with d3.geoPath to render countries from TopoJSON data, while d3.scaleSequential with interpolateGreens and interpolateReds drives the color encoding. Hover tooltips display detailed country statistics via mouse events. The SVG rendering includes an ocean-colored sphere background and grayscale borders for non-data countries.

AI-generated description

World Energy & Emissions Map (2024)

A D3.js visualization showing renewable energy usage and carbon emissions by country.

Features

  • Interactive world map with country-level data
  • Toggle between two metrics: Renewable Energy % and CO₂ Emissions
  • Hover tooltips showing detailed country information
  • Smooth color transitions when switching metrics

Usage

Open index.html in a web browser to view the map.

Data

The visualization includes data for 12 major countries:

  • USA, China, India, Germany, Brazil, Canada, Australia, France, Japan, UK, South Korea, Italy

Technologies

  • D3.js v7 for visualization
  • TopoJSON for geographic data
  • Vanilla JavaScript (ES6 modules)

Comments

Sign in to join the discussion.

MIT Licensed