Skip to main content
100%

Fork of Vega-Lite API Template

✓ Published0🌍 Public
SSunny
Last edited Aug 17, 2022
Created on Aug 17, 2022

This visualization displays automobile performance data from the UCI Machine Learning Repository’s Auto MPG dataset, plotting fuel efficiency (mpg) against horsepower with points colored by origin and sized by weight. Built with the Vega-Lite API, it uses `vl.markCircle`, `vl.x().fieldQ()`, and `vl.y().fieldQ()` to encode fields, while `vl.color().fieldN()` and `vl.size().fieldQ()` map additional variables. The code registers Vega-Lite with `vl.register` and configures a custom dark theme via `config.js`. Data is loaded asynchronously using D3’s `csv` function, and tooltips display car names through the vega-tooltip `Handler`. The chart renders responsively to the window dimensions.

AI-generated description

A 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.

MIT Licensed

Similar vizzes