Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cars Scatter plot with menus

Public visualization

Viewing a saved revision (read-only)

b5cd9acb380846ff8d76ec144103d14e

Cars Scatter plot with menus

0 stars0🌍 Public
JJoel Schwartz
Last edited May 5, 2020
Created on May 5, 2020

This interactive scatter plot displays fuel economy data from the auto-mpg dataset, with dropdown menus that let users select which numeric columns to plot on the X and Y axes. The code uses D3.js v5 scales, axes, and transitions, along with a reusable dropdown menu component. Each car is represented by a semi-transparent green circle that animates to its new position when the menu selection changes, using `transition().duration(2000).delay()` for staggered motion. The visualization updates axes labels and tick marks dynamically based on the selected columns.

AI-generated description