Published
Edited
Apr 29, 2022
4 stars
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
{
var svg = d3.select(DOM.svg(width, height));
//.style("background", "#FCF9F4");
svg.style("background", d3.hcl(now/100, 25, 70)) // 360, +-125, 0-100
// LAB and HCL are better because they are based on perceived lightness
yield svg.node()
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data_cost = d3.text("https://raw.githubusercontent.com/janert/d3-for-the-impatient/master/examples/cost.csv").then( res => {
return d3.csvParseRows( res, d => [ +d[0], +d[1] ] );
})
Insert cell
data_load = d3.csv("https://raw.githubusercontent.com/janert/d3-for-the-impatient/master/examples/load.csv", d => {
var parse = d3.utcParse( "%H:%M:%S" );
var format = d3.utcFormat( "%H:%M" );
return {
ts: parse(d.timestamp),
val: +d.load
}
})
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