Scatter Plot of World Life Expectancy Data versus Education
This scatter plot visualizes the relationship between average years of schooling and life expectancy across countries, colored by continent and scaled by BMI, with tooltips revealing country names. The visualization, built with Vega-Lite and its JavaScript API on top of D3.js, reads data from a CSV file sourced from WHO Life Expectancy data. Users can observe a positive linear correlation between education and lifespan, with African nations clustered at lower schooling levels and European countries at higher ones. The code configures the chart using vl.markCircle, vl.encode, and custom axis styling to enhance readability.
AI-generated descriptionLife Expectancy Data:
Dataset Source: Life Expectancy WHO Data uses the scatter plot visualization using vega-lite-api.
This visualization plot shows the Life expectancy of people in various parts of the world based on the number of years of schooling over a period of 15 years.
The colors represent the various continents. Size of the circle, the average BMI and tooltip displays the countries in the world.
Analysis: We can see that Africa seems to be the continent with less education and Europe displaying maximum education. We also see a linear relationship between schooling and life expectancy which seems to be fascinating.
Note: The template was forked from Vega-Lite-API Template