Skip to main content
100%

Life expectancy Health Expenditure VegaLite

✓ Published0🌍 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

MIT Licensed

Similar vizzes