viewof incomegrp_var_plot = embed({
vconcat:[
{
title: "Low Income Data",
repeat: {
column: Object.keys(inc["Low income"][0]).slice(1,9)
},
spec: {
data: {values: inc['Low income']},
mark: "bar",
encoding: {
x: {field: {"repeat": "column"},bin: {"maxbins": 12}},
y: {aggregate: "count",type: "quantitative"},
},
value: "grey"
}
},
{
title: "Lower Middle Income Data",
repeat: {
column: Object.keys(inc["Low income"][0]).slice(1,9)
},
spec: {
data: {values: inc['Lower middle income']},
mark: "bar",
encoding: {
x: {field: {"repeat": "column"},bin: {"maxbins": 12}},
y: {aggregate: "count",type: "quantitative"},
},
value: "grey"
}
},
{
title: "Upper Middle Income Data",
repeat: {
column: Object.keys(inc["Low income"][0]).slice(1,9)
},
spec: {
data: {values: inc['Upper middle income']},
mark: "bar",
encoding: {
x: {field: {"repeat": "column"},bin: {"maxbins": 12}},
y: {aggregate: "count",type: "quantitative"},
},
value: "grey"
}
},
{
title: "High Income Data",
repeat: {
column: Object.keys(inc["Low income"][0]).slice(1,9)
},
spec: {
data: {values: inc['High income']},
mark: "bar",
encoding: {
x: {field: {"repeat": "column"},bin: {"maxbins": 12}},
y: {aggregate: "count",type: "quantitative"},
},
value: "grey"
}
},
{
title: "Undefined Data",
repeat: {
column: Object.keys(inc["Low income"][0]).slice(1,9)
},
spec: {
data: {values: inc['undefined']},
mark: "bar",
encoding: {
x: {field: {"repeat": "column"},bin: {"maxbins": 12}},
y: {aggregate: "count",type: "quantitative"},
},
value: "grey"
}
},
]})