Viewing a saved revision (read-only)
19d355bcda36447a977d16573977cf9f
Life expectancy Health Expenditure VegaLite
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 descriptionA demonstration of how to start using D3 version 6.
Data from https://gist.github.com/mabelvj/e35a77e8719c881f5567b7da1df43d53