Skip to main content

Embed Observable cells hosted on observablehq.com into Jupyter notebooks.

Project description

observable_jupyter

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'],
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

observable_jupyter-0.1.8.tar.gz (168.6 kB view details)

Uploaded Source

Built Distribution

observable_jupyter-0.1.8-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file observable_jupyter-0.1.8.tar.gz.

File metadata

  • Download URL: observable_jupyter-0.1.8.tar.gz
  • Upload date:
  • Size: 168.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for observable_jupyter-0.1.8.tar.gz
Algorithm Hash digest
SHA256 433bb962635cb59a2320edb886f6a14c436826cae0b09ea04593df5de0cdaa44
MD5 58c53dfd41555c71f44fd587b4b1075a
BLAKE2b-256 63eeb374c3cb932a8dc961883792954976326cb881e3552004d735faf6442cd2

See more details on using hashes here.

File details

Details for the file observable_jupyter-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: observable_jupyter-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for observable_jupyter-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 275a243a383fce4d18e29e3b5d34f38109cd024f13e8a3e39c3365d198a71044
MD5 a2248accd97d747b68f443bc75909dbf
BLAKE2b-256 36a2dc2051704f4e8a4d5fd8365e32b270e125410da8181dcfeb5efb7111ca1e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page