Published
Edited
Nov 24, 2020
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
pie(preview_options)
Insert cell
teachingSets = await FileAttachment("datasets.csv").csv({ typed: true })
Insert cell
preview_options = teachingSets
.filter(d => d.data_url && d.title)
.map(d => ({ value: d.data_url, name: d.title }))
Insert cell
degrees = {
spin.value;
return chance.floating({ min: 0, max: 360 });
}
Insert cell
choices = [choice0, choice1, choice2, choice3, choice4]
Insert cell
import {
choice,
choice0,
choice1,
choice2,
choice3,
choice4
} from "@codingwithfire/coding-with-doom-fire"
Insert cell
pie = d3
.pie()
.padAngle(0.01)
.sort(null)
.value(d => 1)
Insert cell
arc = {
const radius = Math.min(width, height - 50) / 2;
return (
d3
.arc()
// .innerRadius(radius * 0.67)
.innerRadius(50)
.outerRadius(radius - 1)
);
}
Insert cell
height = 700
Insert cell
chosen = chance.pick(options)
Insert cell
d3 = require("d3@6")
Insert cell
Insert cell
Chance = require("chance")
Insert cell
colors = [
// "#23171b",
"#4a58dd",
"#2f9df5",
"#27d7c4",
"#4df884",
"#95fb51",
"#dedd32",
"#ffa423",
"#f65f18",
"#ba2208",
"#900c00"
]
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