Skip to main content
100%

Vega-Lite API Template

✓ Published1🌍 Public
AAnurag Desai
Last edited Sep 18, 2020
Created on Sep 16, 2020

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 description

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

MIT Licensed

Similar vizzes