Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Baseball Scatter Plot Showing Hits and Homeruns

Public visualization

Viewing a saved revision (read-only)

c531d774119c49b297d505ff2526d2e7

Baseball Scatter Plot Showing Hits and Homeruns

1 star3🌍 Public
RRobert Johnson
Last edited Sep 27, 2021
Created on Sep 13, 2021
Forked from D3 Scatter Plot

A scatter plot visualizes the relationship between hits and home runs for baseball players, with each dot colored by league affiliation: red for the American League and blue for the National League. The plot uses D3's `csv` loader to fetch data from a GitHub gist, `scaleLinear` for the axes, `extent` to set domains, and SVG circles with opacity for rendering. Axis labels are added via `axisLeft` and `axisBottom`, with custom text annotations for "Hits" and "Homeruns".

AI-generated description

A scatter plot showing hits and homeruns using the baseball dataset. Dots are colored by the league (National League or American League) that the player belonged to.