Public
Edited
Sep 30, 2021
Importers
1 star
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
Insert cell
Insert cell
Insert cell
function handleMouseOver(d) {
d3.select(this)
.style("opacity", 0.8)
.style("stroke", "#000000")
.style("stroke-width", 2);
tooltip.transition().duration(200).style("opacity", 0.9);
let name = d.properties.NAME;
let lookup = mapData.find((o) => o.name === d.properties.NAME);
let cases = lookup.casesPer100k;
let rate = lookup.positivityRate;

tooltip
.html(
`${name} County:<br />Average test positivity rate: ${rate}<br />Average per capita case rate: ${cases}`
)
.style("left", `${d3.event.pageX + 20}px`)
.style("top", d3.event.pageY - 45 + "px");
}
Insert cell
function handleMouseOut(d) {
d3.select(this)
.style("opacity", 1)
.style("stroke", "#ffffff")
.style("stroke-width", 1);

tooltip.transition().duration(200).style("opacity", 0);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// import {table} from "@tmcw/tables"
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