Published
Edited
Oct 9, 2022
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
generateURLWithState({ message: "my cool object" })
Insert cell
Insert cell
Insert cell
Insert cell
generateURLWithState({ message: "my cool object" }, { param: "myCustomParam" })
Insert cell
Insert cell
Insert cell
generateURLWithState({ message: "my cool object" }, { isEmbedded: true })
Insert cell
Insert cell
generateURLWithState(
{ message: "my cool object" },
{ baseURL: "https://geocities.com" }
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
linkToState({ example: 1, hello: "world" }, { text: "Example 1" })
Insert cell
linkToState({ example: 2, hello: ["a", "sub", "array"] }, { text: "Example 2" })
Insert cell
linkToState({ example: 3, hello: { hello: "world from a sub-object" } }, { text: "Example 3" })
Insert cell
linkToState("this is example 4. it’s a string!", { text: "Example 4" })
Insert cell
linkToState(["example", 5, "is", "an", "array"], { text: "Example 5" })
Insert cell
linkToState("hello", {
text: "Example with custom param",
param: "myCustomParam",
isEmbedded: true
})
Insert cell
linkToState("you can use this when embedding this notebook", {
text: "Example for embedded",
isEmbedded: true
})

Insert cell
linkToState("custom base URL", {
text: "Example with custom base URL",
baseURL: "https://example.com?page=overview"
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
getStateFromQuery()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
b64 = require("js-base64@3.7.2/base64.min.js")
Insert cell
Insert cell
pako = require("pako/dist/pako.min.js")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
notebook.withParams({ hello: "goodbye" }).link("params")
Insert cell
notebook.params
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