Published
Edited
Sep 5, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
labelPadding = 4.5
Insert cell
colorStrokeScale = d3.scaleSequential(d3.interpolateYlOrBr)
.domain(xExtent)
Insert cell
colorScale = d3.scaleSequential(d3.interpolateYlOrBr)
.domain(xExtent)
Insert cell
line = d3.line()
.x(d => x(d.speed))
.y(d => y(d.beaufort))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
beafortEquation = tex`v = 0.836 \times B^{\frac{3}{2}} \left(\frac{m}{s}\right) `
Insert cell
xExtent = [0, 40] // m/s
Insert cell
speeds = d3.range(...xExtent, 0.5) // m/s
Insert cell
data = speeds.map(speed => ({speed, beaufort: beaufortScale(speed) }))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
margin = ({top: 35, right: 40, bottom: 35, left: 40})
Insert cell
height = 500
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