Public
Edited
May 17, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data_processed = aq.from(data_raw)
.join_left(aq.from(country_metadata), ["Country Code", "Code"])
.derive({'Year': aq.escape(d => d3.format(".0f")(d.Time))})
.rename({'GDP per capita (constant 2015 US$) [NY.GDP.PCAP.KD]':'GDP_per_capita'
,'Birth rate, crude (per 1,000 people) [SP.DYN.CBRT.IN]': 'Birth_rate'
,'Death rate, crude (per 1,000 people) [SP.DYN.CDRT.IN]': 'Death_rate'
,'Population ages 65 and above (% of total population) [SP.POP.65UP.TO.ZS]': 'Pop%_65+'
})
.select('Year'
,'Country Name'
,'GDP_per_capita'
,'Birth_rate'
,'Death_rate'
,'Pop%_65+'
,'Income Group'
)
.objects()
Insert cell
Insert cell
data_processed_cleanedIncomeGroup = aq.from(data_processed)
.filter(d=> d["Income Group"] != null & d["Income Group"] != "")
.objects()
Insert cell
Inputs.table(data_processed_cleanedIncomeGroup)
Insert cell
Insert cell
Insert cell
Insert cell
data_processed_cleanedIncomeGroup_forChosenYear
= data_processed_cleanedIncomeGroup.filter(d => d.Year == Year_chosen)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {Wrangler, op} from "@observablehq/data-wrangler"
Insert cell
import {Plot} from "@mkfreeman/plot-tooltip"
Insert cell
import {howTo} from "@clokman/howto"
Insert cell
import {toc} from "@nebrius/indented-toc"
Insert cell
import {BubbleChart} from "@d3/bubble-chart"
Insert cell
import {Swatches} from "@d3/color-legend"
Insert cell
import {displayCaution} from "@mkfreeman/utilities"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more