World Happiness and Health Expenditures Correlation
✓ Published1🌍 Public
This visualization uses a line mark to plot the correlation between a country’s happiness score and its health expenditure per person, with points aggregated by average and the y-axis not starting at zero. It loads CSV data via `d3.csv` from a GitHub gist, then renders the chart using Vega-Lite API functions like `vl.markLine` and `vl.encode`, with a custom config for font sizes and axis styling. The code also includes a commented-out least-squares regression layer and tooltip setup via vega-tooltip, though the active view only displays the basic trend line.
AI-generated descriptionMIT Licensed