Public
Edited
Oct 17, 2023
Insert cell
Insert cell
car-models - data.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof myWidth = Inputs.range([100, 800], { label: "Larghezza", step: 1 })
Insert cell
viewof myHeight = Inputs.range([100, 500], { label: "Altezza", step: 1 })
Insert cell
marginTop = 20
Insert cell
marginBottom = 20
Insert cell
marginLeft = 50
Insert cell
marginRight = 20
Insert cell
Insert cell
yScale = d3.scaleLinear(yExtent, [myHeight - marginBottom, marginTop])
Insert cell
xScale = d3.scaleLinear(xExtent, [marginLeft, myWidth - marginRight])
Insert cell
xExtent = d3.extent(carModelsData, (d) => d["displacement (cc)"])
Insert cell
yExtent = d3.extent(carModelsData, (d) => d["weight (lb)"])
Insert cell
x_axis = d3.axisBottom().scale(xScale)
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