Kanaries/pygwalker

Make Streamlit Bike Sharing app contained within Pygwalker universe

Opened this issue · 2 comments

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.

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

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.