Published
Edited
Jan 20, 2020
1 star
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
interpolatedKnob('interpolateRgb')
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
degreeInterpolate = d3.interpolateString(light, gradientTurn180(light))
Insert cell
light_zip = d3.zip(lightColors, light_percentages).map(currentValue => {
const { l, a, b } = currentValue[0];
return ['${d3.lab(' + `${l},${a},${b}` + ')}', currentValue[1]];
})
Insert cell
dark_zip = d3.zip(darkColors, dark_percentages).map(currentValue => {
const { l, a, b } = currentValue[0];
return ['${d3.lab(' + `${l},${a},${b}` + ')}', currentValue[1]];
})
Insert cell
light_dark_zip = d3
.zip(darkColors.slice(3).concat(lightColors.slice(-3)), dark_percentages)
.map(currentValue => {
const { l, a, b } = currentValue[0];
return ['${d3.lab(' + `${l},${a},${b}` + ')}', currentValue[1]];
})
Insert cell
dark_percentages = dark
.split(new RegExp(/rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/g))
.filter(x => x.includes('%'))
Insert cell
light_percentages = light
.split(new RegExp(/rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/g))
.filter(x => x.includes('%'))
Insert cell
twoDigitFormatter = d3.format(',.2')
Insert cell
Insert cell
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