Cars Scatter Plot w/ Vega Lite API
This example presents a scatter plot of automobile data from a CSV file, showing the relationship between vehicle weight, horsepower, and origin, with point size mapped to miles per gallon. It uses the Vega-Lite API to declaratively define the chart’s encoding, including tooltips that reveal each car’s name. The code integrates Vega, Vega-Lite, Vega-Lite API, and Vega-Tooltip via d3.csv for data loading and a custom configuration for axis styling. The visualization renders as an SVG that fills the browser window, with points colored by origin and sized by fuel efficiency.