data = {
const data = [];
names.forEach(d => {
const income_data = raw_income_data.find(t => t.geoid == d);
const education_data = raw_education_data.find(t => t.geoid == d);
data.push({
"x": +income_data.median,
"y": (+education_data.total_bachelors_or_higher/+education_data.total)*100,
})
})
return Object.assign(data, {
x: "Median household income ($)",
y: "Bachelor's degree or higher (%)",
});
}