Gapminder Data in React and D3 - rotated menu
This example displays Hans Rosling's Gapminder dataset as an animated scatterplot in SVG, plotting annual data from 1950 with country points colored teal. A rotated dropdown menu lets users select which attribute appears on the y-axis, including income per capita, total population, life expectancy, or fertility rate, while the x-axis represents years. Using React's `useState` hook and D3's `scaleLinear`, `extent`, and `csv` data loading, the visualization renders axes and marks via custom SVG components. The React dropdown library provides the interactive control, and the code filters out rows with zero values.
AI-generated descriptionHans Rosling Gapminder data sets: A visualization in React and D3.
Hans Rosling Gapminder summary from 1950 is a summary of data that was downloaded from Step 1 of How to build Animated Charts like Hans Rosling — doing it all in R and originally comes from Gapminder.com