All Projects → thomasballinger → observable-jupyter

thomasballinger / observable-jupyter

Licence: ISC license
Embed visualizations and code from Observable notebooks in Jupyter

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to observable-jupyter

Jupyterlab Interactive Dashboard Editor
A drag-and-drop dashboard editor for JupyterLab
Stars: ✭ 165 (+511.11%)
Mutual labels:  jupyter, notebook
Best Of Jupyter
🏆 A ranked list of awesome Jupyter Notebook, Hub and Lab projects (extensions, kernels, tools). Updated weekly.
Stars: ✭ 200 (+640.74%)
Mutual labels:  jupyter, notebook
Signals And Systems Lecture
Continuous- and Discrete-Time Signals and Systems - Theory and Computational Examples
Stars: ✭ 166 (+514.81%)
Mutual labels:  jupyter, notebook
Iswift
A Swift kernel for IPython.
Stars: ✭ 144 (+433.33%)
Mutual labels:  jupyter, notebook
Beakerx
Beaker Extensions for Jupyter Notebook
Stars: ✭ 2,594 (+9507.41%)
Mutual labels:  jupyter, notebook
Jupyter themes
A plugin to select syntax highlighting on Jupyter
Stars: ✭ 151 (+459.26%)
Mutual labels:  jupyter, notebook
Awesome Jupyterlab Extension
😎 A curated list of awesome Jupyterlab extension projects. 🌠 Detailed introduction with images.
Stars: ✭ 198 (+633.33%)
Mutual labels:  jupyter, notebook
Ipyvolume
3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL
Stars: ✭ 1,696 (+6181.48%)
Mutual labels:  jupyter, plotting
Applied Reinforcement Learning
Reinforcement Learning and Decision Making tutorials explained at an intuitive level and with Jupyter Notebooks
Stars: ✭ 229 (+748.15%)
Mutual labels:  jupyter, notebook
Jupyterlab templates
Support for jupyter notebook templates in jupyterlab
Stars: ✭ 223 (+725.93%)
Mutual labels:  jupyter, notebook
Practical Machine Learning With Python
Master the essential skills needed to recognize and solve complex real-world problems with Machine Learning and Deep Learning by leveraging the highly popular Python Machine Learning Eco-system.
Stars: ✭ 1,868 (+6818.52%)
Mutual labels:  jupyter, notebook
Bokeh
Interactive Data Visualization in the browser, from Python
Stars: ✭ 15,822 (+58500%)
Mutual labels:  jupyter, plotting
Fastdoc
Create publication-quality books from Jupyter notebooks
Stars: ✭ 134 (+396.3%)
Mutual labels:  jupyter, notebook
Ipystata
Enables the use of Stata together with Python via Jupyter (IPython) notebooks.
Stars: ✭ 154 (+470.37%)
Mutual labels:  jupyter, notebook
Ipyexperiments
jupyter/ipython experiment containers for GPU and general RAM re-use
Stars: ✭ 128 (+374.07%)
Mutual labels:  jupyter, notebook
Pixiedust node
Jupyter magic to allow Node.js code to run in a notebook
Stars: ✭ 177 (+555.56%)
Mutual labels:  jupyter, notebook
Kubeflow
Machine Learning Toolkit for Kubernetes
Stars: ✭ 11,028 (+40744.44%)
Mutual labels:  jupyter, notebook
Molecular Design Toolkit
Notebook-integrated tools for molecular simulation and visualization
Stars: ✭ 123 (+355.56%)
Mutual labels:  jupyter, notebook
Paperboy
A web frontend for scheduling Jupyter notebook reports
Stars: ✭ 221 (+718.52%)
Mutual labels:  jupyter, notebook
Ipython
Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
Stars: ✭ 15,107 (+55851.85%)
Mutual labels:  jupyter, notebook

observable-jupyter

Embed cells from Observable notebooks into Jupyter notebooks.

View demo notebook on Colab

This library provides a simple way to embed cells and pass custom inputs values to them from Python code. For more complicated data flow in Jupyter notebooks, see the related library observable-jupyter-widget which uses the Jupyter Widget system to pass data back and forth between Python and JavaScript.

Usage

To install the library, import the embed function, and embed the "graphic" cell from this Observable 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'],
)

Embedding specific cells with the cell keyword parameter of embed([]) causes only these cells to be shown, but every cell still runs.

This behavior is slightly different than the Observable embed default.

About this library

This library uses the APIs provided by Observable to embed notebooks hosted on Observable in Jupyter.

The library was developed at Observable but is now maintained by Thomas Ballinger. All code added before Sept 2021 is copyright Observable.

Development

See ARCHITECTURE.md for an overview.

Because Python library includes JavaScript, you'll need node as well as Python to contribute to it.

The two JavaScript files included in an installed package iframe_bundle.js and wrapper_bundle.js are not saved in this repo. They are generated by rollup, a JavaScript "bundler" that combines JavaScript source code from files in the js folder and dependencies listed in js/package.json.

Installing the Python package with or pip install -e . will automatically run the bundler and produce these files.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].