Skip to main content
100%

D3 Scatter Plot - Earnings and Education

✓ Published0🌍 Public
JJunying Li
Last edited Sep 27, 2021
Created on Sep 13, 2021
Forked from D3 Scatter Plot

This scatter plot visualizes the relationship between years of education and hourly earnings, with blue points for males and red points for females. The data comes from a CSV file loaded asynchronously via `d3.csv`. The code uses D3 v6 scales (`d3.scaleLinear`), axes (`d3.axisLeft`, `d3.axisBottom`), and SVG circles to render the points with opacity for overlap. The chart fills the browser window, with margins defining the plotting area.

AI-generated description

A D3 scatter plot shows the relationship of years of education and earning for males and females.

Data: Earnings and Education Dataset.


y-axis:

Earnings (dollars per hour)

x-axis:

Years of education

Color:

Blue points: male

Red points: female

MIT Licensed

Similar vizzes