Published
Edited
Nov 9, 2021
8 forks
Importers
12 stars
Insert cell
Insert cell
Insert cell
Insert cell
chartWidth = d3.min([500, width])
Insert cell
chartHeight = chartWidth
Insert cell
chartRadius = chartWidth / 2
Insert cell
margin = 40
Insert cell
heatmap = spiralHeatmap()
.radius(chartRadius)
.holeRadiusProportion(0.2)
.arcsPerCoil(12)
.coilPadding(0.1)
.arcLabel("month")
.coilLabel("year")
Insert cell
Insert cell
function convertTextToNumbers(d) {
d.value = +d.value;
d.date = dateParse(d.date);
d.year = yearFormat(d.date);
d.month = monthFormat(d.date);
return d;
}
Insert cell
data = d3.csvParse(
await FileAttachment("data@1.csv").text(),
convertTextToNumbers
)
Insert cell
Insert cell
Insert cell
import { legend } from "@d3/color-legend"
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