{"id":16282616,"url":"https://github.com/thomasballinger/observable-jupyter","last_synced_at":"2025-10-31T10:47:17.125Z","repository":{"id":46754990,"uuid":"410006760","full_name":"thomasballinger/observable-jupyter","owner":"thomasballinger","description":"Embed visualizations and code from Observable notebooks in Jupyter","archived":false,"fork":false,"pushed_at":"2023-07-23T14:01:08.000Z","size":8631,"stargazers_count":57,"open_issues_count":3,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-15T15:19:11.156Z","etag":null,"topics":["jupyter","jupyter-notebook","notebook","observablehq","plotting","plotting-in-python"],"latest_commit_sha":null,"homepage":"https://observable-jupyter.readthedocs.io/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasballinger.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-24T15:06:47.000Z","updated_at":"2025-01-16T06:37:25.000Z","dependencies_parsed_at":"2024-10-10T19:11:18.156Z","dependency_job_id":"43987e7c-9c9d-4866-9182-9930d07734bf","html_url":"https://github.com/thomasballinger/observable-jupyter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasballinger%2Fobservable-jupyter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasballinger%2Fobservable-jupyter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasballinger%2Fobservable-jupyter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasballinger%2Fobservable-jupyter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasballinger","download_url":"https://codeload.github.com/thomasballinger/observable-jupyter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244538528,"owners_count":20468729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyter","jupyter-notebook","notebook","observablehq","plotting","plotting-in-python"],"created_at":"2024-10-10T19:11:13.409Z","updated_at":"2025-10-31T10:47:17.003Z","avatar_url":"https://github.com/thomasballinger.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# observable-jupyter\n\nEmbed cells from [Observable](https://observablehq.com/) notebooks into Jupyter notebooks.\n\n[View demo notebook on Colab](https://colab.research.google.com/drive/1t_wcE-NqoPO-dpnrB9VMQ0KUxR5e1rML?usp=sharing)\n\nThis 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](https://github.com/thomasballinger/observable-jupyter-widget) which uses the Jupyter Widget system to pass data back and forth between Python and JavaScript.\n\n# Usage\n\nTo install the library, import the embed function, and embed the \"graphic\" cell from [this Observable notebook](https://observablehq.com/@mbostock/epicyclic-gearing):\n~~~py\n!pip install observable_jupyter\nfrom observable_jupyter import embed\nembed('@mbostock/epicyclic-gearing', cells=['graphic'], inputs={'speed': 0.2})\n~~~\n\nThe simplest way to use `embed()` is to render an entire Observable notebook:\n~~~py\nembed('@d3/gallery')\n~~~\n\nYou may want to swap in your own data into a D3 chart:\n~~~py\nimport this\ntext = ''.join(this.d.get(l, l) for l in this.s)\nembed('@d3/word-cloud', cells=['chart'], inputs={'source': text})\n~~~\n\nWith multiple cells, you can embed interactive charts!\n~~~py\nembed(\n    '@observablehq/visualize-a-data-frame-with-observable-in-jupyter,\n    cells=['vegaPetalsWidget', 'viewof sepalLengthLimits', 'viewof sepalWidthLimits'],\n)\n~~~\n\nEmbedding specific cells with the cell keyword parameter of `embed([])` causes only these cells to be shown, but every cell still runs.\n\nThis behavior is slightly different than the Observable embed default.\n\n## About this library\n\nThis library uses the APIs provided by [Observable](https://observablehq.com) to embed notebooks hosted on Observable in Jupyter.\n\nThe library was [developed at Observable](https://github.com/observablehq/observable-jupyter) but is now maintained by Thomas Ballinger.\nAll code added before Sept 2021 is copyright Observable.\n\n## Development\n\nSee [ARCHITECTURE.md](./ARCHITECTURE.md) for an overview.\n\nBecause Python library includes JavaScript, you'll need node as well as Python to contribute to it.\n\nThe two JavaScript files included in an installed package iframe_bundle.js and wrapper_bundle.js are not saved in this repo.\nThey are generated by rollup, a JavaScript \"bundler\" that combines JavaScript source code\nfrom files in the js folder and dependencies listed in [js/package.json](./js/package.json).\n\nInstalling the Python package with or `pip install -e .` will automatically run the bundler and produce these files.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasballinger%2Fobservable-jupyter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasballinger%2Fobservable-jupyter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasballinger%2Fobservable-jupyter/lists"}