Published
Edited
Jan 8, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
line = d3.line().x(d => x(d.year))
Insert cell
x = d3
.scaleLinear()
.domain(filteredYearDomain)
.range([0, miniChartDimensions[0]])
Insert cell
currentDataYExtent = d3.extent(data.flatMap(d => d.values), d => d.value)
Insert cell
filteredYearDomain = d3.extent(data[0].values, d => d.year)
Insert cell
rawYearDomain = d3.extent(rawGrouped[0].values, d => d.year)
Insert cell
miniChartDimensions = [40, 20]
Insert cell
Insert cell
Insert cell
labelCoordinatesMap = new Map(
ncGeo.features
.map(({ properties: { FIPS_integ: fips }, geometry }) => [
fips,
...getLabelPos(geometry)
])
.map(function([fips, long, lat]) {
return [fips, projection([long, lat])];
})
)
Insert cell
Insert cell
Insert cell
Insert cell
import { select, slider, checkbox } from "@jashkenas/inputs"
Insert cell
import { getLabelPos } from "@mourner/labeling-with-stretched-polylabel"
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