Drawing a Scatterplot
✓ Published0🌍 Public
ZZhengyan Yu
Last edited Jul 31, 2017
Created on Jul 31, 2017
This visualization shows a scatterplot of 1995 World Bank data, plotting GDP per capita on the x-axis against CO2 emissions per capita on the y-axis, with circle size encoding population. Each country is rendered as a labeled SVG group with a circle and text label. The code uses `d3.csv` to load the data, `d3.scalePow` with an exponent of 0.5 for both axes, `d3.scaleSqrt` for sizing circles, and `d3.axisBottom`/`d3.axisLeft` to draw the grid. Clicking a country highlights it with a red stroke via the `classed` method.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed