e-mission / op-admin-dashboard

An admin/deployer dashboard for the NREL OpenPATH platform
0 stars 8 forks source link

equisse/tableau style visualizations in the dashboard #95

Open shankari opened 7 months ago

shankari commented 7 months ago

Back when emdash was written in R/Shiny, @asiripanich used equisse to drag and drop variables to create visualizations on the fly. Alas, python does not have equisse. I tried earlier to look for an option to do this in plotly but only found the cloud based chart studio, which we cannot easily since we would have to send our data to the cloud. I did figure out thati this is called "tableau-style visualization".

And when I was poking around again today for "tableau-style visualizations", I found https://medium.com/@HeCanThink/pygwalker-a-graphic-walkthrough-of-tableau-style-user-interface-in-jupyter-python-15674be950bb

It seems to be open source and reasonably well maintained. Although the main example of how to embed it is using streamlit, streamlit and plotly are fairly similar, so it seems like we should be able to get it work. It looks like it also has an integrated data table. Thoughts?

@jgreenlee @achasmita

JGreenlee commented 7 months ago

I read that guide and demoed PyGWalker. I do think it is worth trying to embed. It could be really powerful, as it would allow admins to create their own plots showing the relationship of whatever variables they'd like to see, without having to write their own scripts/notebooks.

It's an interactive way to generate plots. But the generated plots themselves are not interactive like Plotly plots are (ie you can not pan or zoom on them). They are static (I'm guessing it's just using matplotlib)

I tried this demo of PyGWalker with a random sample dataset I found. I was able to spin up some quick and dirty charts like the ones below within a minute or 2.

image image
shankari commented 7 months ago

But the generated plots themselves are not interactive like Plotly plots are (ie you can not pan or zoom on them). They are static (I'm guessing it's just using matplotlib)

I think that is fine. As long as people can filter and visualize, I think we have covered the majority of the use cases. You can simulate pan and zoom by better filtering.

I hope that:

You can save the data exploration result to a local file

Means that the data exploration includes filtering, although I couldn't find any further evidence in either the docs or the code.

Let's explore this further as part of the GSA GPG work.

shankari commented 7 months ago

It looks like this is an FAQ and there is a tutorial for use with plotly dash, although it seems a bit clunky https://docs.kanaries.net/pygwalker/tutorials/use-pygwalker-in-plotly-dash

achasmita commented 7 months ago

I tried the same example. The ease with which user can navigate through different plots by switching variable is great. Also it easily allows users to switch to different plot types. Screen Shot 2024-01-20 at 7 26 08 PM

achasmita commented 5 months ago

I created new page and tried using pygwalker with user data and trips data, it is working fine with dash. Screen Shot 2024-03-11 at 10 38 59 AM Screen Shot 2024-03-11 at 10 50 11 AM