Fork of Vega-Lite API Template I
This example visualizes the relationship between fuel efficiency (mpg), horsepower, and weight for various car models, with origin mapped to color and point size reflecting weight. It uses the Vega-Lite API to construct a scatter plot, pulling data from the UCI Machine Learning Repository's Auto MPG dataset. The visualization is rendered via d3.v5, leveraging Vega-Lite's declarative specification through the `vl` API, with an interactive tooltip displaying car names. The code imports vega, vega-lite, and vega-tooltip, and customizes axis styling and font sizes via a config 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.