Published
Edited
Sep 8, 2020
Insert cell
md`# Example • Random dog breeds • Observable reactive fetch from Web API`
Insert cell
dog = (await fetch(`https://dog.ceo/api/breed/${breed}/images/random`)).json()
Insert cell
viewof breed = select(Object.keys(breeds.message))
Insert cell
// viewof breed = select(Object.keys(breeds.message))
Insert cell
html`<img src='${dog.message}' />`
Insert cell
breeds = (await fetch(`https://dog.ceo/api/breeds/list/all`)).json()
Insert cell
import {select} from "@jashkenas/inputs"
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