Skip to main content
100%

Baseball Scatterplot With Menus

✓ Published1🌍 Public
PPatrick-Houlihan
Last edited Oct 7, 2021
Created on Oct 7, 2021

This interactive scatterplot, rendered with SVG, displays baseball statistics for players with at least 200 at-bats. Users change the X and Y axes via dropdown menus, choosing from quantitative stats like Batting Average and On Base Percentage, or the categorical Team variable. The visualization uses D3's `selection.join` API to efficiently update circle positions and axes with a 1000ms transition, while the menu system uses a custom `dispatch` event handler. The dataset is loaded from a GitHub Gist using `d3.csv`.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts and Observable: selection.join.

Dataset

The dataset can be found here

What This Shows

This Viz shows a scatterplot with various different quantitative scales and variables

An interesting setup for the data is Team vs OBP, Mike Trout is so incredibly better in this season than any of his teammates it's ridiculous.

MIT Licensed

Similar vizzes