vegalite({
"vconcat":[
{
title: "Low Income",
repeat: {column: unique_vars},
spec: {
data: {values: groupByIncome_df['Low income']},
mark: "bar",
encoding: {
x: {
field: {"repeat":"column"},
"bin": {"maxbins": 12},
},
y: {aggregate: "count", type: "quantitative"}
}
}
},
{
title: "Lower Middle Income",
repeat: {column: unique_vars},
spec: {
data: {values: groupByIncome_df['Lower middle income']},
mark: "bar",
encoding: {
x: {
field: {"repeat":"column"},
"bin": {"maxbins": 12},
},
y: {aggregate: "count", type: "quantitative"}
}
}
},
{
title: "Upper Middle Income",
repeat: {column: unique_vars},
spec: {
data: {values: groupByIncome_df['Upper middle income']},
mark: "bar",
encoding: {
x: {
field: {"repeat":"column"},
"bin": {"maxbins": 12},
},
y: {aggregate: "count", type: "quantitative"}
}
}
},
{
title: "High Income",
repeat: {column: unique_vars},
spec: {
data: {values: groupByIncome_df['High income']},
mark: "bar",
encoding: {
x: {
field: {"repeat":"column"},
"bin": {"maxbins": 12},
},
y: {aggregate: "count", type: "quantitative"}
}
}
},
{
title: "Undefined",
repeat: {column: unique_vars},
spec: {
data: {values: groupByIncome_df['undefined']},
mark: "bar",
encoding: {
x: {
field: {"repeat":"column"},
"bin": {"maxbins": 12},
},
y: {aggregate: "count", type: "quantitative"}
}
}
}
]
})