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

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