🌍 Public
Viewing a saved revision (read-only)
7083b1d3dbec46d0b08a2aa7f56d0859
FCC: Vega lite exploration
This example uses the Vega-Lite API to render a horizontal bar chart of automobile horsepower by name, with color encoding by country of origin and tooltips on hover. It loads the Auto MPG dataset from the UCI Machine Learning Repository via a CSV fetch using d3.csv. The visualization dynamically fits the browser window, and the Vega-Lite specification is registered with Vega and enhanced with Vega-Tooltip for interactive data inspection. Custom axis styling is applied through a configuration object.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The data shown here comes from the UCI Machine Learning Repository: Auto MPG Data Set, via Gist: Scatter Plot with Menus.