Interactive Color Legend Scatter Plot for Health Expenditure Vs Life Expectancy
This interactive scatter plot visualizes the relationship between health expenditure and life expectancy across countries, with continents encoded by color. A dropdown menu allows users to switch which attribute maps to the X and Y axes, while hovering over the color legend highlights points from that continent and fades others. Built with React and D3 v5, it uses `scaleLinear` for axes, `scaleOrdinal` for colors, and SVG circles rendered via the `Marks` component. Data comes from a CSV file loaded with `d3.csv`.
AI-generated descriptionAn interactive color legend Scatter plot for Health Expenditure Vs Life Expectancy using the Life Expectancy Data.
This scatterplot takes required inputs from the data(like Health Expenditure, Life Expectancy and Continent) and uses these as inputs to both X and Y axes with the help of a dropdown. This scatter plot would help in finding the correlation between life expectancy and healthcare expenditure inturn helping countries to improve the life span.It also uses "Continent" as an input for Color Legend.Hovering over this helps in viewing the correlation in each continent.
Note: I got some ideas about the interactive color legend from Prof. Curran's Interactive Color Legend