Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Streamlit Bike Sharing app contained within Pygwalker universe #654

Open
MarcSkovMadsen opened this issue Nov 6, 2024 · 2 comments

Comments

@MarcSkovMadsen
Copy link
Contributor

MarcSkovMadsen commented Nov 6, 2024

I had two issues when trying to convert the Streamlit Bike Sharing app to a panel app.

  • The gw_config.json cannot be used by GraphicWalker React directly. I need to unwrap it by taking the inner configuration when using with GraphicWalker React. There is no explanation. And as far as I can see this is created outside the Pygwalker universe.
  • The range filter in the spec can as far as I can see not be created via the GraphicWalker UI. My guess is that its coming from outside Pygwalker universe or manually added. This is also hard to understand and creates confusion.
@ObservedObserver
Copy link
Member

ObservedObserver commented Nov 8, 2024

The config part is the most important information and can be directly used for pygwalker.

Except config, workflows list can be generated by the config, and is only used for some edge cases when pygwalker is used as static assets, like preview mode in jupyter notebook/kaggle notebooks. In most cases, it is not required.

But if you need to get the workflow list, you can use the util function specToWorkflow in graphic-walker to turn a graphic walker spec (the config part) into its workflow. (graphic-walker/packages/graphic-walker/src/utils/workflow.ts)

For the range filter, it can be generated in graphic-walker, you need to add a quantitative field to filter, then switch the filter type to range.
image

@MarcSkovMadsen
Copy link
Contributor Author

Thx. I can now create the range filter. I need to first remove the manually added month range filter. Change to quantitative and then I can re-add it again.

Just changing to quantitative field without removing filter will not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants