Public
Edited
Aug 15, 2021
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
patientsByRegion
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
datesTable = {
const svg = d3.select(DOM.svg(width, height));
svg.append("g")
.call(xAxisTime);

svg.append("g")
.selectAll("g")
.data(stackedDates)
.join("g")
.attr("stroke", "white")
.selectAll("rect")
.data(d => d)
.join("rect")
.attr("x", d => margin.left + d[0])
.attr("y", d => y(d.data.key))
.attr("width", d=> (d[1]) - d[0])
.attr("height", y.bandwidth())
.attr("fill", function(d) {
const week = d3.select(this.parentNode).datum().key;
const tract = d.data.key;
return modelingColor(d.data[week]);
})
.on('mouseover', function(d) {
const week = d3.select(this.parentNode).datum().key;
const tract = d.data.key
const accessor = d.data[week];
d3.select("#something").text(`${tract} – ${week} – Cases: ${d.data[week]}`)
})
.on('mouseout', d => d3.select("#something").text(``))
svg.append("g")
.call(yAxis);
svg.selectAll(".tick line").attr("stroke", "#8A9BA8")

return svg.node();
}
Insert cell
i = d3.interpolateNumber(2.29e-7, 0.095161105)
Insert cell
i(0.2)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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