Public
Edited
Jan 30, 2023
8 forks
132 stars
Insert cell
Insert cell
simpleStatistics = require("simple-statistics@7")
Insert cell
simpleStatistics.standardDeviation([1, 2, 3])
Insert cell
Insert cell
Insert cell
moment2 = require("moment@2")
Insert cell
Insert cell
moment = require("moment")
Insert cell
moment("January 2, 2018").subtract(1, "year").year()
Insert cell
Insert cell
d3v6 = require("d3@6/dist/d3.min.js")
Insert cell
Insert cell
d3 = require("d3/dist/d3.min.js")
Insert cell
Insert cell
ganja = require("https://cdn.jsdelivr.net/npm/ganja.js@1.0.194/ganja.js")
Insert cell
Insert cell
viewof source = html`<input type=file accept=".js">`
Insert cell
module = require(URL.createObjectURL(source))
Insert cell
Insert cell
// Only load the DSV and Selection parts of D3, and combine their exports into one object
d3CsvAndFetch = require("d3-dsv@3", "d3-selection@3")
Insert cell
Insert cell
{
// using await to resolve the Promise returned by require
let _ = await require("lodash@4");
// using the module
return _.filter([1, 2, 0]);
}
Insert cell
Insert cell
Insert cell
notValid = require("@observablehq/not-a-real-npm-module")
Insert cell
Insert cell
Insert cell
d3v7 = require("d3@7")
Insert cell
require.resolve("d3@7")
Insert cell
Insert cell
Insert cell
Insert cell
d3v7_esm = import("https://cdn.skypack.dev/d3@7")
Insert cell
Insert cell
Insert cell
Insert cell
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