data = aq
.from(dataCountryCodes)
.join(
aq.from(population),
(a, b) => a["Country code"] === b["Code"] && a["year"] === b["Year"],
[aq.all(), "Population"]
)
.select({
"Country name": "Name",
"Country code": "Code",
year: "Year",
"Life Ladder": "Cantril Ladder Score",
"Positive affect": "Positive Affect",
"Negative affect": "Negative Affect",
Population: "Population",
"Log GDP per capita": "GDP per Capita (Log)",
"Healthy life expectancy at birth": "Healthy Life Expectancy",
"Social support": "Social Support Score",
"Freedom to make life choices": "Freedom to Make Life Choices Score",
Generosity: "Generosity Score",
"Perceptions of corruption": "Perceptions of Corruption Score"
})
.objects()