Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Bar chart - Highest MPG

Public visualization

Viewing a saved revision (read-only)

82d4dbee49974aacbd54e9305cfa00e7

Fork of Bar chart - Highest MPG

0 stars0🌍 Public
Ddriftcafe
Last edited Apr 28, 2022
Created on Apr 28, 2022

This bar chart visualizes the average city MPG for different car makes, sorted from lowest to highest, with MINI achieving the highest fuel efficiency. The chart uses a sequential red color scale to encode MPG values, with darker shades representing higher efficiency. Built with D3.js v6, it employs `d3.scaleBand`, `d3.scaleLinear`, and `d3.scaleQuantize` for axes and color mapping, along with `d3.legendColor` for the legend. Interactive tooltips display exact MPG values on hover, and the data comes from a CSV file listing each make’s average MPG.

AI-generated description