life-expectancy-map
✓ Published3🌍 Public
This interactive choropleth map displays global life expectancy by country, with a selectable year slider that updates the color-coded visualization. Built with React and D3 v7, it loads UN WPP data from a CSV file and combines it with world GeoJSON topology using continent geometry from world-atlas. The map uses d3.geoPath, d3.scaleSequential, and d3.interpolateYlGnBu to render country polygons, while d3.pointer and mouse events drive tooltip interactions showing country names and values.
AI-generated descriptionScatter Plot — First Visual
This project is a first prototype (“first visual”) for my dataset.
Dataset & Source
- Life Expectancy (UN WPP via OWID): https://ourworldindata.org/life-expectancy
- (Original link to data file if you have it)
Columns used
- X: Year (parsed as time)
- Y: life_expectancy (years)
- (Optional) Filtered to a single country for clarity.
Forked from “Basic Scatter Plot with React & D3” by Curran Kelleher.
Iteration Notes
- Converted scatter → line chart to suit time series.
- Added axes & axis labels; colored lines by country with inline labels.
- Data: UN WPP via Our World in Data (life expectancy by country/year, 2000+). Source: https://ourworldindata.org/life-expectancy Columns used: Entity, Year, life_expectancy
MIT Licensed