Public
Edited
Jan 3, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
breeds = (await fetch(`https://dog.ceo/api/breeds/list/all`)).json()
Insert cell
import {select} from '@jashkenas/inputs'
Insert cell
dog = (await fetch(`https://dog.ceo/api/breed/${breed}/images/random`)).json()
Insert cell
Insert cell
viewof breed = select(Object.keys(breeds.message))
Insert cell
alphabet = require('@observablehq/alphabet')
Insert cell
vegalite=require("@observablehq/vega-lite")
Insert cell
vegalite({
data: { values: alphabet },
mark: "bar",
autosize: "fit",
width: width, // <- add this line
encoding: {
x: {
field: "letter",
type: "ordinal"
},
y: {
field: "frequency",
type: "quantitative"
}
}
})
Insert cell
viewof table=Inputs.table(olympians)
Insert cell
a = Plot.plot({
marks: [
Plot.barX(
olympians,
Plot.groupY(
{ x: "count" },
{ y: "nationality", sort: { y: "x", reverse: true, limit: 10 } }
)
),
Plot.ruleX([0])
],
color: {
legend: true
}
})
Insert cell
import { db } from "@observablehq/google-merchandise-sales-data"
Insert cell
db
SELECT * FROM items
Insert cell
name = "murder"
Insert cell
[...name].reverse().join("")
Insert cell
import { testimport, testVariable } from "@zpliu1126/core"
Insert cell
testimport()
Insert cell
import { data } from "@d3/learn-d3-shapes"
Insert cell
import { chart } from "@d3/contours"
Insert cell
ExportSVG({
download: DOM.download,
chart: chart,
filename: "111.svg"
})
Insert cell
DOM.download
Insert cell
Insert cell
import { ExportSVG } from "@zpliu1126/core"
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more