Published
Edited
Nov 16, 2021
Fork of My Notebooks
2 forks
Importers
28 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// search example for custom user notebooks collection display
searchNotebooks = searchByTitle(notebooks, 'chicago crimes')
Insert cell
Insert cell
Insert cell
Insert cell
notebook = getNotebookInfo(notebooks[0])
Insert cell
notebookNodes = notebook.nodes
Insert cell
notebookFunctions = getNotebookFunctions(notebook)
Insert cell
namedNotebookCells = getNamedNotebookCells(notebook)
Insert cell
function getNotebookInfo(notebook) {
return fetch(`${apiUrl}/document/@${userName}/${notebook.slug}`).then(d => d.json())
}
Insert cell
function getNotebookById(notebookId) {
return fetch(`${apiUrl}/document/${notebookId}`).then(d => d.json())
}
Insert cell
function getNotebookByUrl(notebookUrl) {
return fetch(`${apiUrl}/document/${notebookUrl}`).then(d => d.json())
}
Insert cell
function getNotebookFunctions(notebook) {
return notebook.nodes.filter(node => node.value.startsWith('function'));
}
Insert cell
function getNamedNotebookCells(notebook) {
return notebook.nodes.filter(node => !node.value.startsWith('function') &&
node.value.indexOf('=') > 0 &&
(node.value.indexOf('`') < 0 || node.value.indexOf('`') > node.value.indexOf('=')) );
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
vegalite = require('@observablehq/vega-lite')
Insert cell
nlp = require('compromise')
Insert cell
import {text} from "@jashkenas/inputs"
Insert cell
d3cloud = require('d3-cloud')
Insert cell
import {createWordCloudSvg, downloadWordCloud, toWords} from '@randomfractals/nlp-word-cloud'
Insert cell
import {dot} from '@mbostock/graphviz'
Insert cell
import {rasterize, serialize} from '@mbostock/saving-svg'
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