HDI Scatter Plot With Color
This scatter plot visualizes the relationship between life expectancy at birth and gross national income per capita for countries in 2021, using the United Nations Development Programme (UNDP) HDI dataset. Each circle represents a country, colored by its UNDP developing region, with opacity revealing dense clusters. The visualization uses D3 v7 APIs including `scaleLinear`, `scaleOrdinal`, `schemeCategory10`, and custom `axes` and `colorLegend` functions to render the chart and legend. The plot shows a clear positive trend between the two variables, with regional groupings potentially identifiable through color.
AI-generated descriptionA simple scatterplot of the HDI dataset with colors applied to reflect the UNDP developing region: https://gist.github.com/smcavey/5f819b6d6a270c6de339532a592399d4 Comparing mean life expectancy at birth in the year 2021 (x) vs. gross national income per capita in the year 2021 (y). Pretty clear trend. Added opacity so its easier to visualize dense clusters. Information on the outliers would be nice, such as using a mouse hover to see the country name. UNDP developing regions have been specified via color and the index to be able to identify potential groupings by region.