Skip to main content
Public

Share visualization

Loading preview…

D3 Scatter Plot - Earnings and Education

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

D3 Scatter Plot - Earnings and Education

0
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

Comments

Sign in to join the discussion.

MIT Licensed