Published unlisted
Edited
Feb 16, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
htl.html`${BarChart(
cs.groups.get("estrato").all(),
variables.get("estrato").config
)}
${BarChart(
cs.groups.get("localidad").all(),
variables.get("localidad").config
)}`
Insert cell
Insert cell
htl.html`${[...variables.keys()].map(d => BarChart(
cs.groups.get(d).all(),
variables.get(d).config
))}`
Insert cell
Insert cell
{
const container = html`<div style="display:flex;">`;

function renderCharts(){
d3.select(container)
.selectAll(".chart")
.data(variables.keys())
.join("div")
.attr("class", "chart")
.each(function(a) {
console.log(a);
const data = cs.groups.get(a).all();
d3.select(this)
.append("svg")
.attr("width", width / 2)
.attr("height", 360)
.html(BarChart(data, variables.get(a).config).innerHTML);
});
}

renderCharts();

return container;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more