Public
Edited
Apr 21, 2023
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
counties
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
scaleR = {
const maximum = d3.max(
geoDataJoined.counties.features.map((d) => d.properties.fireArmsPer1k)
);
const maxRadius = width * 0.0125;
return d3.scaleSqrt().domain([0, maximum]).range([0, maxRadius]);
}
Insert cell
scaleClasses = {
const classCount = 5;
const domain = geoDataJoined.states.features.map((d) => d.properties.per10k);
const thresholds = d3.range(classCount).map((d) => 0.1 + d / classCount / 2);
const range = thresholds.map((d) => d3.interpolateGreys(d));
const scaleClasses = d3.scaleQuantile().domain(domain).range(range);
return scaleClasses;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
geoPath = d3.geoPath(projection)
Insert cell
Insert cell
Insert cell
Insert cell
import { adminUnitsGermany } from "86f71582b87bba35"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
lodash = require("lodash@4.17.21/lodash.js")
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