Published unlisted
Edited
Mar 23, 2019
Insert cell
Insert cell
// modified from https://observablehq.com/@mbostock/embedded-notebook
Object.assign(html`<iframe style="width:100%;height:200px;border:none;">`, {srcdoc: `
<!DOCTYPE html>
<style>

.observablehq { margin: 0; }
.observablehq > :only-child { display: block; }

</style>
<body>
<script type=module>

import {Runtime, Inspector} from "https://cdn.jsdelivr.net/npm/@observablehq/runtime@4/dist/runtime.js";
function define(runtime, observer) {
const main = runtime.module();
main.variable(observer("A")).define("A", function(){return(
class A {
state = []
}
)});
main.variable(observer()).define(["A"], function(A) {
return new A;
});
return main;
}

new Runtime().module(define, Inspector.into(document.body));

</script>
`})
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