🌍 Public
Viewing a saved revision (read-only)
c531d774119c49b297d505ff2526d2e7
Baseball Scatter Plot Showing Hits and Homeruns
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 descriptionA 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.