Kanaries / pygwalker

PyGWalker: Turn your pandas dataframe into an interactive UI for visual analysis
https://kanaries.net/pygwalker
Apache License 2.0
13.33k stars 698 forks source link

[Feat] Add support for Plotly Dash #16

Open samatix opened 1 year ago

samatix commented 1 year ago

Hi maintainers,

Hope this message finds you in good health. I wanted to reach out to ask if it's possible to add support for Plotly Dash. It's useful for creating interactive web-based dashboards but can benefit from all the data exploration part.

Thanks

IloBe commented 1 year ago

Hi all, customers using plotly apps would love this enhancement and data science teams as well. Thanks for your great library, Ilona

ghost commented 1 year ago

+1

seqyuan commented 1 year ago

+1

Stephen451 commented 1 year ago

Same here, it'd be super useful

DavMelchi commented 1 year ago

And allow to export plotly code... That will be awesome! 👌

ObservedObserver commented 1 year ago

Thoughts update:

I do believe that allowing graphic-walker/pygwalker to support multiple charts lib is a great idea. Technically, we need to implement a parser layer to transform graphic-walker DSL into other chart code/specification. It's a cool engineering abstract. I will be happy to implement it.

But, I am still not sure why people need a different chart library for visual exploration. I don't find there is much benefit of ploty than vega/vega-lite. Hope someone can share your demands or insights here.

IloBe commented 1 year ago

@ObservedObserver To my opinion, with Plotly Dash you can do much more than visual exploration. It is fast and easy to build a whole Web-application with a lot of different features.

samatix commented 1 year ago

@ObservedObserver , thanks for checking this out. As @IloBe mentioned, the use case is the same as Streamlit. The purpose is not to use Plotly for the charts but more to embed Pygwalker in a Dash (plotly) app (see examples here).

ObservedObserver commented 1 year ago

Update

Hi, everyone. Now you can use pygwalker as a component in Plotly Dash, check this document: Use PyGWalker with Plotly Dash

For hosting pygwalker as a web app (or dashboard), you can also use:

  1. Streamlit: https://docs.kanaries.net/pygwalker/use-pygwalker-with-streamlit
  2. Gradio: How to Use PyGWalker with Gradio
  3. shiny-python: How to Integrate PyGWalker with Shiny-Python

Or even flask or django if you are familiar with web development.

GitHunter0 commented 1 month ago

Hey @ObservedObserver , I really looking forward to using it with dash but the code provided is returning the error below when I try to interact with pygwalker.

image

Session info --------------------------------------------------------------------
Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 (64-bit)
Python: 3.12
Packages ------------------------------------------------------------------------
dash-dangerously-set-inner-html==0.0.2
dash==2.18.1
pygwalker==0.4.9.9