Public
Edited
Nov 16, 2023
Insert cell
Insert cell
Select a data source…
Type SQL, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3 = require("d3@6")
Insert cell
Insert cell
Insert cell
primes[0]
Insert cell
Insert cell
CarsInfo[0]
Insert cell
CarsInfo[0].AWD
Insert cell
Insert cell
CarsInfo[0].City_MPG +CarsInfo[0].Hwy_MPG
Insert cell
// CarsInfo = D3.
Insert cell
file = FileAttachment("cars_original.csv")

Insert cell
Insert cell
dataFile = d3.csvParse(car3,d3.autoType)
Insert cell
values1 = dataFile.map(d=>d.Weight)
Insert cell
d3.max(values1, "Retail_Price")
Insert cell
d3.min(values1)
Insert cell
d3.mean(values1)
Insert cell
values = dataFile.map(d=>d.len)
Insert cell
import {chart as chart1} with {values1 as data} from "@d3/histogram"
Insert cell
chart1
Insert cell
VegaLite = require("vega-embed@6")
Insert cell
VegaLite({
"data": {
"values": dataFile
},
"mark": "point",
"width":700,
"encoding": {
"x": {"field": "Len", "type": "quantitative"},
"y": {"aggregate":"mean", "field": "Weight", "type": "quantitative"}
}
})




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