Skip to main content
100%

Interactive Color Legend Scatterplot to determine Alcohol consumption Vs Life Expectancy

✓ Published2🌍 Public

This interactive scatterplot visualizes the relationship between alcohol consumption and life expectancy across continents using WHO life expectancy data. The visualization employs d3.scaleLinear for both axes and d3.scaleOrdinal for the color legend, which maps continents to distinct colors. Users can hover over legend items to highlight data points from specific continents while fading others to 20% opacity. The React-based SVG rendering includes custom axis components and color legend handling, with interactive hover states managed through React state and d3 event handlers.

AI-generated description

An Interactive Color Legend Scatter plot for Life Expectancy Data.

This scatterplot takes required inputs from the data(like Alcohol Consumption, Life Expectancy and Continent) and uses these as inputs to both X and Y axes with the help of an Interactive Color Legend using 'Continent' as input. This scatter plot would help in determining the relationship between Alcohol Consumption and Life Expectancy in various continents.

MIT Licensed

Similar vizzes