Skip to main content
100%

Class 02 Homework - Life & Income

✓ Published0🌍 Public
VVirginiaHNg
Last edited Jun 14, 2017
Created on Jun 14, 2017

This visualization plots the relationship between national income and life expectancy for over 100 countries, using a scatterplot where each circle represents a country. The code loads data from an embedded array, scales income and life expectancy values to map positions, and renders the points as SVG circles. It uses D3 v4's `d3.scaleLinear` for both axes and `d3.axisBottom`/`d3.axisLeft` to generate the chart frame. The visualization directly encodes each country’s income on the x-axis and life expectancy on the y-axis, revealing a positive correlation between wealth and longevity.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes