Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

This repository has been archived. Please see the fork maintained by Thomas Ballinger.

License

Notifications You must be signed in to change notification settings

observablehq/observable-jupyter

Repository files navigation

observable_jupyter

This repository has been archived, and is now maintained here.

Embed cells from Observable notebooks into Jupyter notebooks.

View demo notebook on Colab

To install the library, import the embed function, and embed the "graphic" cell from this notebook:

!pip install observable_jupyter
from observable_jupyter import embed
embed('@mbostock/epicyclic-gearing', cells=['graphic'], inputs={'speed': 0.2})

The simplest way to use embed() is to render an entire Observable notebook:

embed('@d3/gallery')

You may want to swap in your own data into a D3 chart:

import this
text = ''.join(this.d.get(l, l) for l in this.s)
embed('@d3/word-cloud', cells=['chart'], inputs={'source': text})

With multiple cells, you can embed interactive charts!

embed(
    '@observablehq/visualize-a-data-frame-with-observable-in-jupyter,
    cells=['vegaPetalsWidget', 'viewof sepalLengthLimits', 'viewof sepalWidthLimits'],
)

About

This repository has been archived. Please see the fork maintained by Thomas Ballinger.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published