{"version":"1.0","type":"rich","title":"Linear Regression Line with D3.js","description":"This example shows the correlation between a country’s happiness score and its health expenditure per person using a scatter plot with a linear regression trendline. The visualization, built with D3.js v3 and SVG, plots each country as a green circle, with axes labeled in dollars and happiness scores, and overlays a blue best-fit line computed via a least-squares function that returns the slope, intercept, and R-squared value. Data is loaded from a CSV file hosted on GitHub, while the regression calculation uses native array methods like `map` and `reduce`.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/f3aba18e7d4c41509e2e55a78741a4bf?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}