viewof groups = embed({
vconcat: [{
title: "Countries of Origin with Low Income",
repeat: {column: vars},
spec: {
data: {values: income_group['Low income']},
mark: "bar",
encoding: {
x: {
field: {"repeat":"column"},
bin: {maxbins: 12}
},
y: {
aggregate: "count",
type: "quantitative"
}
}
}
},
{
title: "Countries of Origin with Lower Middle Income",
repeat: {column: vars},
spec: {
data: {values: income_group['Lower middle income']},
mark: "bar",
encoding: {
x: {
field: {"repeat":"column"},
bin: {maxbins: 12}
},
y: {
aggregate: "count",
type: "quantitative"
}
}
}
},
{
title: "Countries of Origin with Upper Middle Income",
repeat: {column: vars},
spec: {
data: {values: income_group['Upper middle income']},
mark: "bar",
encoding: {
x: {
field: {"repeat":"column"},
bin: {maxbins: 12}
},
y: {
aggregate: "count",
type: "quantitative"
}
}
}
},
{
title: "Countries of Origin with High Income",
repeat: {column: vars},
spec: {
data: {values: income_group['High income']},
mark: "bar",
encoding: {
x: {
field: {"repeat":"column"},
bin: {maxbins: 12}
},
y: {
aggregate: "count",
type: "quantitative"
}
}
}
}]
})