Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Chocolate_price_ScatterPlot

Public visualization

Chocolate_price_ScatterPlot

0 stars1🌍 Public
AALIMINETI SPOORTHY REDDY
Last edited Oct 24, 2025
Created on Oct 24, 2025

This reusable scatter plot, built with D3.js v7, visualizes the relationship between a country's CO₂ emissions and its GDP using data loaded from a CSV file. It clearly shows the data distribution across these two variables, with each country represented as a steel-blue circle. The visualization employs D3's `scaleLinear` for both axes, `axisBottom` and `axisLeft` for the tick marks, and `d3.extent` to set the domain. The function `scatterPlot` is designed to be reusable, accepting any container, dataset, and variable names for flexible comparisons.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed