Public
Edited
Feb 28, 2024
Insert cell
Insert cell
viewof table = [
{"a": "C", "b": 2},
{"a": "C", "b": 7},
{"a": "C", "b": 4},
{"a": "D", "b": 1},
{"a": "D", "b": 2},
{"a": "D", "b": 6},
{"a": "E", "b": 8},
{"a": "E", "b": 4},
{"a": "E", "b": 7}
]
Insert cell
Insert cell
({
data: {url: data['cars.json']},
mark: "point",
encoding: {
x: {field: "Horsepower", type: "quantitative"},
y: {field: "Miles_per_Gallon", type: "quantitative"}
}
})
Insert cell
data['cars.json'].url
Insert cell
data = require('vega-datasets@2')
Insert cell
data.version
Insert cell
airports = data['airports.csv']()
Insert cell
cars = data['cars.json']()
Insert cell
Plot.plot({
marks: [
Plot.dot(cars, {x: "power (hp)", y: "economy (mpg)"})
]
})
Insert cell
viewof amount = Inputs.range([0, 100], {label: "Amount", step: 1})
Insert cell
The value is ${amount}
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