🌍 Public
Fork of Vega-Lite API Template
This scatter plot visualizes the relationship between fuel efficiency (mpg) and horsepower for cars, with each point’s color indicating the country of origin and its size reflecting vehicle weight. A tooltip reveals the car’s name on hover. The visualization is constructed programmatically using the Vega-Lite API, with a custom configuration for axis styling and tooltip formatting. Data is loaded from a CSV file via `d3.csv`, and the chart is rendered into an SVG using the Vega-Lite and Vega libraries, with interactivity enhanced by the Vega Tooltip handler.
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.
MIT Licensed
Comments
Sign in to join the discussion.