Viewing a saved revision (read-only)
sbi-YWAZdZ9e453194oxG
Created from react-d3-starter template
UN WPP 2024 — Dataset Documentation & Starter Visualization
Dataset Overview
- Filename:
un_wpp_2024.csv(available at virtual path/data/un_wpp_2024.csv) - Rows: 1,000
- Columns: 14
- Size: ~1.9 MB
The dataset appears to be a country-year panel of demographic indicators in the
style of the United Nations World Population Prospects. Each row seems to
represent one country (iso_code, location) observed in one year between
1960 and 2024, with population totals, sex breakdowns, vital rates, and
urbanization measures. Note that the uploaded sample contains 1,000 rows
covering 16 distinct iso_code values, so it may be a subset of the full WPP
release. These interpretations are tentative and based on column names and
observed value ranges, not verified metadata.
Column Descriptions
| Column | Apparent meaning | Munzner type | Missing / notes |
|---|---|---|---|
iso_code |
3-letter country code (e.g., ABW) | Geographic identifier | 0 missing; 16 distinct values |
location |
Country name (e.g., Aruba) | Geographic identifier | 0 missing; 16 distinct values |
region |
Broad UN region (e.g., Americas) | Nominal | 195 missing (rows with blank region) |
subregion |
UN subregion (e.g., Latin America and the Caribbean) | Nominal | 195 missing; 8 distinct values |
year |
Observation year | Temporal (numeric year) | 0 missing; range 1960–2024 |
total_population |
Total population count | Quantitative | 0 missing; ~9,510 to ~769 million |
pop_male |
Male population count | Quantitative | 0 missing |
pop_female |
Female population count | Quantitative | 0 missing |
median_age |
Median age of population | Quantitative | All 1,000 values missing (empty in the sample) |
birth_rate |
Crude birth rate (births per 1,000, tentative) | Quantitative | 0 missing; ~6.8–55.2 |
death_rate |
Crude death rate (deaths per 1,000, tentative) | Quantitative | 0 missing; ~0.9–32.0 |
life_expectancy |
Life expectancy at birth, in years (tentative) | Quantitative | 0 missing; ~31.5–84.5 |
fertility_rate |
Total fertility rate, births per woman (tentative) | Quantitative | 0 missing; ~1.03–7.77 |
urban_pct |
Share of population living in urban areas, percent (tentative) | Quantitative | 0 missing; ~8.1–95.4 |
Parsing assumptions
- The header is the first CSV record; cells may contain commas and newlines, so a real CSV parser is required. All columns parse cleanly with standard CSV rules in the observed sample.
- Numeric columns are read with unary
+; blankmedian_agevalues becomeNaNand are excluded from visualizations. - Rows with missing
region/subregionare treated as "unknown region."
Starter Visualization
Type: Scatter plot — fertility rate (x) vs. life expectancy (y), one point per country at its latest available year.
Encodings:
- x:
fertility_rate(quantitative, linear scale) - y:
life_expectancy(quantitative, linear scale, inverted so higher is up) - color:
region(nominal, categorical palette) - area:
total_population(sqrt scale — area encodes population honestly) - tooltip (native
<title>): country, year, region, population, fertility, life expectancy
Why: This is the classic demographic-transition view — countries with high fertility tend to have shorter life expectancy. Encoding the latest year per country avoids overplotting the full 1,000-row panel while still summarizing the data; region color and population size add context without clutter.
Interactions: Hover tooltips via native SVG titles. Kept minimal by design; the file is intended as a clean, reusable starting point for further AI-generated prototypes.
Files:
index.html— page shell and import mapindex.jsx— mounts<App />App.jsx— loads/data/un_wpp_2024.csvat runtime viad3.csvviz.js— D3 render entry pointrenderScatter.js— draws the scatter plotuseContainerDimensions.js— responsive container sizingstyles.css— page stylesREADME.md— this documentation