Vega-Lite API Template
This example visualizes the World Happiness Report 2020 data, plotting each country’s happiness score against its logged GDP per capita, with points colored by regional indicator and tooltips showing country details. Built with the Vega-Lite API, it uses `vl.markPoint()` and `vl.encode()` to define the scatter plot, while `d3.csv` loads the remote dataset. The visualization is rendered as an SVG via Vega and Vega-Lite, with a custom configuration for axis and label styling, and it fills the browser window using an autosize fit setting.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The data shown here comes from the [World Happiness Report 2020] (https://www.kaggle.com/mathurinache/world-happiness-report?select=2020.csv), via Gist: World Happiness Report 2020.