Baseball Scatter Plot, Hits and Homeruns, Iterated
This scatter plot visualizes the relationship between hits and home runs in baseball, with each dot representing a player-season. The chart displays data from three leagues—American, National, and Federal—distinguished by color and identified in a legend. Using D3.js (v6) with SVG rendering, the visualization loads a CSV dataset via `d3.csv`, then maps hits and home runs to linear scales with `scaleLinear`. Points are drawn as semi-transparent circles, and axes are generated using `axisLeft` and `axisBottom` to display the quantitative values.
AI-generated descriptionThis scatter plot shows hits and homeruns using the baseball dataset. For my iteration, I did two things. Firstly, I included the Federal League in my chart. Even though it only existed from 1914-15, it played a significant role in the evolution of baseball. Secondly, I added a legend to the chart. In my original plot I colored the dots by league but I never added a legend, nor did I describe the meaning of the colors in the README. Thus, that part of the chart was not useful at all.