Skip to main content
100%

Gapminder GDP per Capita

✓ Published1🌍 Public
Sskasliwal@wpi.edu
Last edited Oct 4, 2025
Created on Aug 31, 2025
Forked from Loading Data

This example loads a Gapminder GDP dataset in wide format and displays the raw parsed data as JSON in the browser. It uses D3 v7’s `csvParse` to convert the CSV into an array of objects, then transforms string values like `"10.1k"` into numeric GDP per capita figures. The visualization fetches the remote CSV via `fetch`, processes the year columns from 1800 to 2100, and relies on a state management pattern with a `setState` function to trigger re-renders. The current implementation is a data-loading scaffold, not a finished chart.

AI-generated description

Gapminder GDP per Capita This dataset, sourced from the Gapminder Foundation, provides Gross Domestic Product per capita (GDP) for various countries over a long period of time. The data is structured in a "wide" format, with each country as a row and each year as a column, making it ideal for visualizing trends and comparisons.

Source URL: https://www.gapminder.org/data/

Attribute Descriptions country: Categorical (The name of the country).

Years (1800 through 2100): Quantitative and Temporal (The GDP per capita value for each corresponding year).

MIT Licensed

Similar vizzes