Skip to content

Releases: Kanaries/pygwalker

0.3.10

03 Nov 10:07
Compare
Choose a tag to compare

About PyGWalker 0.3.10

Cloud Config (Specification)

In this update, we provide enhanced spec with cloud to allow you to save and share your charts through cloud. Here is an example you can use could file to save your spec:

walker = pyg.walk(df, spec="ksf://<workspace_name>/<file_path>")

Check this document for detail usage: Use cloud config in pygwalker to save your spec

New Configuration And Privacy Policy

We update privacy policy and refactor code of setting config, more details: How to set your privacy configuration?

[pygwalker privacy policy]
offline: fully offline, no data is send or api is requested
update-only: only check whether this is a new version of pygwalker to update
events: share which events about which feature is used in pygwalker, it only contains events data about which feature you arrive for product optimization. No DATA YOU ANALYSIS IS SEND.

Add Track Collector

We will collect some metrics to optimize pygwalker users' and developers' experience (whether you arrive at a feature), which will not involve user data.
If you do not want to share this, you can set your privacy policy to "update-only" or "offline".

Host and Share PyGWalker in Cloud(Experimental Features)

We are testing a feature that allows you to publish your charts with online code or just one click. Then, you can use the published charts as a web app to share with others or as an embeddable live component to integrate with other systems.

from pygwalker.api.kanaries_cloud import create_cloud_walker, walk_on_cloud

# create a cloud pygwalker
create_cloud_walker(df, chart_name="pyg-test", workspace_name="xxxxx")

# render ui of cloud pygwalker
walk_on_cloud("xxxxx", "pyg-test")

How to cancel showing cloud tools

pygwalker 0.3.10 displays buttons related to cloud tools by default, If you don't want to display it, please run code:

import pygwalker as pyg

pyg.walk(df, show_cloud_tool=False)

Feat

  • feat: add vizgpt feature(temporary) #279
  • feat: add cloud config file read and write #280
  • feat: store local user id #286
  • feat: modify cloud server tips #287
  • feat: add communication on gradio(pre-demo) #289
  • feat: avoid read config files from affecting the main feature #290
  • feat: add new feature walk_on_cloud #296
  • feat: add track collector by #299
  • feat: avoid kanaries_token being rendered directly on the html by #300
  • feat: cancel log of update version #301
  • feat: add upload cloud spec tips when spec params is none #303

Refactor

  • refactor: pygwalker config utils #285
  • refactor: streamlit module #297
  • refacotr: split fucntion from create_cloud_graphic_walker #298

Fix

  • fix: communications can't work when gradio reload #291

@longxiaofei

Full Changelog: 0.3.9...0.3.10

0.3.10a3

30 Oct 20:13
Compare
Choose a tag to compare
0.3.10a3 Pre-release
Pre-release

Main feature updates

  • Chat Interface (Text-to-Visualization)
  • Gradio native support (enable kernel computation)
  • Update way of modify privacy configuration and privacy options
  • Add ksf spec config

Feat

  • feat: add vizgpt feature(temporary) #279
  • feat: add cloud config file read and write #280
  • feat: modify cloud server tips #287
  • feat: add communication on gradio(pre-demo) #289
  • feat: avoid read config files from affecting the main feature #290

Refactor

  • refactor: pygwalker config utils #285

Fix

  • fix: communications can't work when gradio reload #291

Todo

  • Complete documentation for new features

Full Changelog: 0.3.9...0.3.10a3

0.3.9

18 Oct 12:24
Compare
Choose a tag to compare

Temporarily limit duckdb version to ensure that the feature of date drill can be used normally.😭

After it, dsl-parser will be updated to adapt to the new version of duckdb.

Full Changelog: 0.3.8...0.3.9

0.3.8

17 Oct 10:25
Compare
Choose a tag to compare

About PyGWalker 0.3.8

Streamlit Multiple Rendering Modes

In pygwalker==0.3.7, we added a new communication feature in streamlit, which can help us implement many new feature in streamlit.

In pygwalker==0.3.8, pygwalker provide two rendering modes in streamlit,include explore and renderer mode.

explore mode helps developers explore datas and develop the charts they need to display.

renderer mode can only render the chart without displaying other tool buttons.

example url: https://pygwalker-in-app-vipsfjjsyx2p6wwmm8yey9.streamlit.app/

example code:

from pygwalker.api.streamlit import init_streamlit_comm, StreamlitRenderer

# Initialize pygwalker communication
init_streamlit_comm()


# You should cache your pygwalker renderer, if you don't want your memory to explode
@st.cache_resource
def get_pyg_renderer() -> "StreamlitRenderer":
    df = get_data()
    # When you need to publish your application, you need set `debug=False`,prevent other users to write your config file.
    return StreamlitRenderer(df, spec="./billion_config.json", debug=True)

renderer = get_pyg_renderer()

# Display explore ui, Developers can use this to prepare the charts you need to display.
renderer.render_explore()

# Display pure chart, index is the order of charts in explore mode, starting from 0.
renderer.render_pure_chart(0)

add pre-filters param in streamlit renderer.

We can pre-filter the data in the renderer and use it with other components of streamlit.

example url: https://pygwalker-in-app-vipsfjjsyx2p6wwmm8yey9.streamlit.app/

example code:

...

from pygwalker.api.streamlit import PreFilter

pre_filters = []
pre_filters.append(PreFilter(
    field="country",
    op="one of",
    value=["CN", "US", "EN"]
))

# set global pre-filters in renderer
renderer.set_global_pre_filters(pre_filters)

# Set a pre-filter for a certain chart, it will overwrite global pre-filters
renderer.render_pure_chart(0, pre_filters=pre_filters)

...

Others

  • Hoping anyone can provide us with any suggestions for improvements, thank anyone all in advance.
  • We will improve the documentation and tutorials of pygwalker in the next few days.
  • Optimized the usage experience of Snowflake connector (fix many bugs).

Feat

  • feat: streamlit support renderer mode of graphic-walker #258
  • feat: update grpahic-walker to support fold feature #259
  • feat: modify single chart renderer in streamlit #261
  • feat: size of chart remains the same as size of html #262
  • fix: adjust returned value of StreamlitRenderer #263
  • feat: streamlit add pre-filters feature #265
  • feat: pure_renderer support to switch explore mode #267

Fix

  • fix: snowflake connection data types #237
  • fix: format sql in database parser #241
  • fix: communication is not established when render geo chart #243
  • fix: temporary fix for sqlglot conversion error #244
  • fix: fix date feature bugs #245
  • fix: DatabaseDataParser format_sql #246
  • fix: DatabaseDataParser parse sub_query #249
  • fix: streamlit base url #255
  • fix: temporal range bug #268

Chore

  • chore: add new optional dependency #238
  • chore: lazy load gw_dsl_parser module #250

Refactor

  • refactor: use shadcn components #253

@ObservedObserver @longxiaofei

Full Changelog: 0.3.7...0.3.8

0.3.8a7

14 Oct 05:32
Compare
Choose a tag to compare
0.3.8a7 Pre-release
Pre-release

About PyGWalker 0.3.8-pre

Streamlit Multiple Rendering Modes

In pygwalker==0.3.7, we added a new communication feature in streamlit, which can help us implement many new feature in streamlit.

In pygwalker==0.3.8a7, pygwalker provide two rendering modes in streamlit,include explore and renderer mode.

explore mode helps developers explore datas and develop the charts they need to display.

renderer mode can only render the chart without displaying other tool buttons.

example url: https://pygwalker-in-app-vipsfjjsyx2p6wwmm8yey9.streamlit.app/

example code:

from pygwalker.api.streamlit import init_streamlit_comm, StreamlitRenderer

# Initialize pygwalker communication
init_streamlit_comm()


# You should cache your pygwalker renderer, if you don't want your memory to explode
@st.cache_resource
def get_pyg_renderer() -> "StreamlitRenderer":
    df = get_data()
    # When you need to publish your application, you need set `debug=False`,prevent other users to write your config file.
    return StreamlitRenderer(df, spec="./billion_config.json", debug=True)

renderer = get_pyg_renderer()

# Display explore ui, Developers can use this to prepare the charts you need to display.
renderer.render_explore()

# Display pure chart, index is the order of charts in explore mode, starting from 0.
renderer.render_pure_chart(0)

add pre-filters param in streamlit renderer.

We can pre-filter the data in the renderer and use it with other components of streamlit.

example url: https://pygwalker-in-app-vipsfjjsyx2p6wwmm8yey9.streamlit.app/

example code:

...

from pygwalker.api.streamlit import PreFilter

pre_filters = []
pre_filters.append(PreFilter(
    field="country",
    op="one of",
    value=["CN", "US", "EN"]
))

# set global pre-filters in renderer
renderer.set_global_pre_filters(pre_filters)

# Set a pre-filter for a certain chart, it will overwrite global pre-filters
renderer.render_pure_chart(0, pre_filters=pre_filters)

...

Others

  • We will release the official version 0.3.8 as soon as possible.
  • Hoping anyone can provide us with any suggestions for improvements, thank anyone all in advance.
  • We will improve the documentation and tutorials of pygwalker in the next few days.

Feat

  • feat: streamlit support renderer mode of graphic-walker #258
  • feat: update grpahic-walker to support fold feature #259
  • feat: modify single chart renderer in streamlit #261
  • feat: size of chart remains the same as size of html #262
  • fix: adjust returned value of StreamlitRenderer #263
  • feat: streamlit add pre-filters feature #265
  • feat: pure_renderer support to switch explore mode #267

Fix

  • fix: snowflake connection data types #237
  • fix: format sql in database parser #241
  • fix: communication is not established when render geo chart #243
  • fix: temporary fix for sqlglot conversion error #244
  • fix: fix date feature bugs #245
  • fix: DatabaseDataParser format_sql #246
  • fix: DatabaseDataParser parse sub_query #249
  • fix: streamlit base url #255
  • fix: temporal range bug #268

Chore

  • chore: add new optional dependency #238
  • chore: lazy load gw_dsl_parser module #250

Refactor

  • refactor: use shadcn components #253

@ObservedObserver @longxiaofei

Full Changelog: 0.3.7...0.3.8a7

0.3.7

22 Sep 09:15
Compare
Choose a tag to compare

About PyGWalker 0.3.7

1. Streamlit Communication

Good news for streamlit developers,

Some popular features available in Jupyter now are accessible in streamlit as well!

  • Save chart configuration
  • Use DuckDB as a computation engine for handling larger datasets

Usage Note: If deploying on Streamlit, especially if it's publicly accessible, please adhere to the best practices for pygwalker on Streamlit. The demo code contains critical comments; ensure you understand them before integration.

demo code: https://github.com/Kanaries/pygwalker-in-streamlit/blob/main/pygwalker_comm_demo.py
online url: https://pygwalker-in-app-dngxb2r82ho2zqct244v7b.streamlit.app/

import pandas as pd
import streamlit.components.v1 as components
import streamlit as st
from pygwalker.api.streamlit import init_streamlit_comm, get_streamlit_html

st.set_page_config(
    page_title="Use Pygwalker In Streamlit",
    layout="wide"
)

st.title("Use Pygwalker In Streamlit(support communication)")

# Initialize pygwalker communication
init_streamlit_comm()

# When using `use_kernel_calc=True`, you should cache your pygwalker html, if you don't want your memory to explode
@st.cache_resource
def get_pyg_html(df: pd.DataFrame) -> str:
    # When you need to publish your application, you need set `debug=False`,prevent other users to write your config file.
    # If you want to use feature of saving chart config, set `debug=True`
    html = get_streamlit_html(df, spec="./gw0.json", use_kernel_calc=True, debug=False)
    return html

@st.cache_data
def get_df() -> pd.DataFrame:
    return pd.read_csv("https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv")

df = get_df()

components.html(get_pyg_html(df), width=1300, height=1000, scrolling=True)

Note: Ensure you review the demo code comments thoroughly before implementing the new Pygwalker in Streamlit.

2. Support external database as datasource & computation engine (Experimental)

Pygwalker now allows databases, like Snowflake, to be used as data sources and compute engines.

Example:

from pygwalker.data_parsers.database_parser import Connector

conn = Connector(
    "snowflake://user_name:password@account_identifier/database/schema",
    "SELECT * FROM bike_share"
)

walker = pyg.walk(conn)

Usage Note: It's currently not recommended to publish pygwalker applications using the Connector feature to the public network.

Feat

  • feat: support communications on streamlit #228
  • feat: support database connector #233

@longxiaofei

Full Changelog: 0.3.6...0.3.7

0.3.6

15 Sep 03:17
Compare
Choose a tag to compare

About Pygwalker 0.3.6

Graphic-Walker have major update.

  • support drill for time field.
  • support feature for time field.
  • enhance old calculated fields, bin, bin count...
0.3.6-feat.mov

Feat

  • feat: adjust inferred field type #218
  • feat: use new dsl_parser #219
  • feat: add drill function on the temporal field #222

Refactor

  • refactor: delete auth-wrapper lib #220

Fix

  • fix: react render cause dnd not work #223

Plan

  • add profiling features.
  • optimize share features.
  • custom calculated fields.
  • add communication in streamlit

@longxiaofei

Full Changelog: 0.3.5...0.3.6

0.3.5

01 Sep 09:02
Compare
Choose a tag to compare

About Pygwalker 0.3.5

Pygwalker add feature of sharing charts on the kanaries, you can share your charts to anybody.

Here is a chart I just shared: https://kanaries.net/share/notebook/cwa8g22r6kg0#heading-0

Document: How to use new feature of pygwalker: share charts?

Currently we only support uploading datasets no larger than 100MB, we will optimize it next version.

Feat

  • feat: share charts beta version #215

Refactor

  • refactor: compress wasm #213

Plan

  • add profiling features.
  • optimize share features.

@longxiaofei

Full Changelog: 0.3.4...0.3.5

0.3.4

24 Aug 09:16
Compare
Choose a tag to compare

Feat

  • feat: auto fill new field in old chart config #205

Fix

  • fix: version is empty when export code #206

Plan

  • update share chart features(beta version).
  • add profiling features.

@longxiaofei

Full Changelog: 0.3.3...0.3.4

0.3.3

17 Aug 12:28
Compare
Choose a tag to compare

Welcome Spatial Visualization!

PyGWalker 0.3.3 now supports spatial visualization. You can now visualize your dataframe on maps!

Scatter plot on map:

g2-map2

Choropleth plot on map:

image

Feat

  • support dataframe of spark(but not recommended use spark dataframe) #200
  • add share chart features by kanaries cloud(alpha version) #202
  • upgrade graphic-walker version, add geo charts #202

Plan

  • update share chart features(beta version).
  • add profiling features.

@longxiaofei

Full Changelog: 0.3.2...0.3.3