Fork of HTML Starter
✓ Published0🌍 Public
This scatterplot visualizes the relationship between vehicle horsepower and torque for a dataset of cars, using circle position for the two quantitative axes, categorical color for engine layout, and circle size for MPG. A Nissan Skyline GT-R R34 is highlighted in orange. The D3.js v7 code loads CSV data, calculates mean and median summaries, and renders an SVG with d3.scaleLinear, d3.scaleOrdinal with Tableau10 colors, d3.scaleSqrt sizing, and interactive tooltips on hover.
AI-generated descriptionHW5 — Marks and Channels
A D3.js visualization exploring the relationship between vehicle horsepower and torque, with data encoding using multiple visual channels.
Improvements Made
Fixed Encoding Violations
- Categorical Color: Changed from sequential blue scale to proper categorical palette (Tableau10)
- Removed Shape Encoding: Eliminated confusing shape-based quantitative encoding
Enhanced Q1 Data Summary
- Added mean and median calculations for both X and Y axes
- Improved layout with structured summary rows
- Clear formatting with proper number formatting
Additional Enhancements
- Added interactive tooltips showing detailed data on hover
- Improved legend with separate sections for categories and size
- Better visual hierarchy and styling
- Hover effects for better interactivity
- Proper sorting to prevent large circles from occluding smaller ones
MIT Licensed