Coder Social home page Coder Social logo

eodagmbh / py-shiny-observable Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 969 KB

Shiny bindings for Observable Notebooks

Home Page: https://eodagmbh.github.io/py-shiny-observable/

License: MIT License

Python 68.75% JavaScript 31.25%
observable python shiny

py-shiny-observable's Introduction

shinyobservable

Release pypi Build status License

Embed Observable Notebooks in Shiny for Python.

Shinyobservable makes it a breeze to integrate libraries such as D3.

Create any kind of JavaScript visualizations with Observable and let Shiny handle your data and interactivity.

Features

  • Embed entire notebooks
  • Embed selected cells only
  • Update data cells to update visualizations

Installation

pip install shinyobservable

# Dev
pip install git+https://github.com/eodaGmbH/py-shiny-shinyobservable

Quickstart

from htmltools import a
from shiny.express import ui
from shinyobservable import Observable, ObservableRenderer

NOTEBOOK = "https://observablehq.com/@d3/zoomable-sunburst"

ui.h1("Observable Notebook in Shiny")
ui.div(a(NOTEBOOK, href=NOTEBOOK, target="_blank"))
ui.hr()

# Render entire notebook
@ObservableRenderer
def render_notebook():
    return Observable(NOTEBOOK)


# Render single cells only
@ObservableRenderer
def render_cells():
    return Observable(NOTEBOOK, cells=["chart"])

Enjoy your Observable Notebook in Shiny!

See this example on how to update the data of your notebook.

Docs

https://eodagmbh.github.io/py-shiny-observable/

py-shiny-observable's People

Contributors

crazycapivara avatar

Stargazers

Gregory Demin avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.