Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Life expectancy Health Expenditure VegaLite

Public visualization

Viewing a saved revision (read-only)

0c6a54f0e8de4782bee2726627964956

Life expectancy Health Expenditure VegaLite

0 stars0🌍 Public
Ddvinubius
Last edited May 22, 2021
Created on May 22, 2021
Forked from Hello VizHub

This example maps life expectancy against health expenditure per capita for 189 countries in 2014, using horizontal bars colored by health spending to reveal potential correlations. It imports data from a CSV file via D3 v6's `csv` loader, filtering and reshaping the raw World Bank dataset. The visualization is built with Vega-Lite and rendered through the Vega-Lite API, using `vl.markBar`, `vl.x().fieldN`, `vl.y().fieldQ`, and `vl.color().fieldQ` to encode country, life expectancy, and health expenditure. Custom axis styling and tooltips are configured via the Vega-Lite config and vega-tooltip handler.

AI-generated description

A demonstration of how to start using D3 version 6.

Data from https://gist.github.com/mabelvj/e35a77e8719c881f5567b7da1df43d53