🌍 Public
Viewing a saved revision (read-only)
198f447b2915433d85a2b274e2f8b8cf
Iterating with Vega-Lite API
This visualization displays automotive data as a bar chart, encoding horsepower along the x-axis and origin along the y-axis, with tooltips showing vehicle names. Built using Vega-Lite’s API, it leverages the `vl.markBar` and `vl.encode` methods to define the chart structure. The code loads the auto-mpg dataset via D3’s `csv` function, then renders the visualization with Vega-Lite and Vega, applying custom styling for axes and labels. The chart fills the browser window with bar size and opacity specified for readability.
AI-generated description