Skip to main content
100%

activity6 question9

✓ Published0🌍 Public
Ggketan456@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

This visualization shows the correlation between population and GDP across several countries from 1970 to 1974, with each bubble representing a country-year pair. The x-axis maps population in millions, the y-axis maps GDP in billion USD, while bubble radius encodes the year and color distinguishes countries. Users can hover over any bubble to see its exact country, year, population, and GDP values via a custom tooltip. The code uses d3.csv to load the data, d3.scaleLinear for axes and size scaling, d3.scaleOrdinal with d3.schemeTableau10 for colors, and includes legends for both the year-driven bubble sizes and country colors.

AI-generated description

d3.csv('bubblechart.csv').then((data) => { console.log(data); // Check if data is loaded properly // Existing code... });

MIT Licensed

Similar vizzes