{"id":24680272,"url":"https://github.com/juba/pyobsplot","last_synced_at":"2025-04-08T06:33:01.157Z","repository":{"id":149149453,"uuid":"620719961","full_name":"juba/pyobsplot","owner":"juba","description":"Observable Plot in Jupyter notebooks and Quarto documents","archived":false,"fork":false,"pushed_at":"2025-02-21T12:48:42.000Z","size":113665,"stargazers_count":225,"open_issues_count":10,"forks_count":10,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-01T04:51:52.078Z","etag":null,"topics":["anywidget","jupyter","jupyter-widget","observable-plot","python","quarto"],"latest_commit_sha":null,"homepage":"https://juba.github.io/pyobsplot/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juba.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"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":"2023-03-29T08:38:25.000Z","updated_at":"2025-03-23T01:09:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"5d5f9989-27ee-48df-9e8f-e75ea051e781","html_url":"https://github.com/juba/pyobsplot","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juba%2Fpyobsplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juba%2Fpyobsplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juba%2Fpyobsplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juba%2Fpyobsplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juba","download_url":"https://codeload.github.com/juba/pyobsplot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792099,"owners_count":20996877,"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":["anywidget","jupyter","jupyter-widget","observable-plot","python","quarto"],"created_at":"2025-01-26T14:12:57.030Z","updated_at":"2025-04-08T06:33:01.136Z","avatar_url":"https://github.com/juba.png","language":"HTML","readme":"# pyobsplot\n\n[![PyPI](https://img.shields.io/pypi/v/pyobsplot.svg?color=green)](https://pypi.org/project/pyobsplot)\n[![npm](https://img.shields.io/npm/v/pyobsplot?color=green)](https://www.npmjs.com/package/pyobsplot)\n[![Tests](https://github.com/juba/pyobsplot/actions/workflows/tests.yml/badge.svg)](https://github.com/juba/pyobsplot/actions/workflows/tests.yml)\n[![Documentation](https://github.com/juba/pyobsplot/actions/workflows/publish.yml/badge.svg)](https://github.com/juba/pyobsplot/actions/workflows/publish.yml)\n[![Open In Colab](https://github.com/juba/pyobsplot/raw/main/doc/img/colab-badge.svg)](https://colab.research.google.com/github/juba/pyobsplot/blob/main/examples/introduction.ipynb)\n\n`pyobsplot` allows to use [Observable Plot](https://observablehq.com/@observablehq/plot?collection=@observablehq/plot) to create charts in [Jupyter](https://jupyter.org) notebooks, [VSCode](https://code.visualstudio.com) notebooks, [Google Colab](https://colab.research.google.com) and [Quarto](https://quarto.org) documents. Plots are created from Python code with a syntax as close as possible to the JavaScript one.\n\nIt allows to do things like :\n\n```python\nimport polars as pl\nfrom pyobsplot import Plot\n\npenguins = pl.read_csv(\"https://github.com/juba/pyobsplot/raw/main/doc/data/penguins.csv\")\n\nPlot.plot({\n    \"grid\": True,\n    \"color\": {\"legend\": True},\n    \"marks\": [\n        Plot.dot(\n            penguins,\n            {\"x\": \"flipper_length_mm\", \"y\": \"body_mass_g\", \"fill\": \"species\"}\n        ),\n        Plot.density(\n            penguins,\n            {\"x\": \"flipper_length_mm\", \"y\": \"body_mass_g\", \"stroke\": \"species\"}\n        )\n    ]\n})\n```\n\n![Sample plot screenshot](https://github.com/juba/pyobsplot/raw/main/doc/screenshots/readme_plot.png)\n\n## Installation and usage\n\n`pyobsplot` can be installed with `pip`:\n\n```sh\npip install pyobsplot\n```\n\nFor usage instructions, see the [documentation website](https://juba.github.io/pyobsplot):\n\n-   See [getting started](https://juba.github.io/pyobsplot/getting_started.html) for a quick usage overview.\n-   See [usage](https://juba.github.io/pyobsplot/usage.html) for more detailed usage instructions.\n\nIf you just want to try this package without installing it on your computer, you can open an introduction notebook in Google Colab:\n\n[![](https://github.com/juba/pyobsplot/raw/main/doc/img/colab-badge.svg)](https://colab.research.google.com/github/juba/pyobsplot/blob/main/examples/introduction.ipynb)\n\n## Features and limitations\n\n**Features:**\n\n-   Syntax as close as possible to the JavaScript one\n-   Plots can be generated as Jupyter widgets, or as SVG, HTML or PNG outputs (via typst)\n-   Plots can be saved to Widget HTML, static HTML, SVG, PNG or PDF files\n-   [Pandas](https://pandas.pydata.org) and [polars](https://pola.rs) DataFrame and Series objects are serialized using [Arrow](https://arrow.apache.org) IPC format for improved speed and better data type conversions\n-   Works with Jupyter notebooks and Quarto documents\n-   Works offline, no iframe or dependency to Observable runtime\n-   Caching mechanism of data objects if they are used several times in the same plot\n-   Custom JavaScript code can be passed as strings with the `js` method\n-   Python `date` and `datetime` objects are automatically converted to JavaScript `Date` objects\n\n**Limitations:**\n\n-   Plot interactions (tooltips, crosshair...) are only available with the \"widget\" format (\u003chttps://github.com/juba/pyobsplot/issues/16\u003e).\n-   Very limited integration with IDE (documentation and autocompletion) for Plot methods. (\u003chttps://github.com/juba/pyobsplot/issues/13\u003e)\n\n## Credits\n\n-   [Observable Plot](https://observablehq.com/@observablehq/plot?collection=@observablehq/plot), developed by [Mike Bostock](https://observablehq.com/@mbostock) and [Philippe Rivière](https://observablehq.com/@fil) among others.\n-   The widget is developed thanks to the [anywidget](https://anywidget.dev) framework.\n-   [typst](https://typst.app) is used to convert HTML figures to PNG, SVG or PDF.\n-   Some code from the `jsdom` renderer has been adapted from [altair_saver](https://github.com/altair-viz/altair_saver).\n-   The documentation website is generated by [Quarto](https://quarto.org).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuba%2Fpyobsplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuba%2Fpyobsplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuba%2Fpyobsplot/lists"}