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

chore: update readme && default params #214

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 23 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

**PyGWalker** (pronounced like "Pig Walker", just for fun) is named as an abbreviation of "**Py**thon binding of **G**raphic **Walker**". It integrates Jupyter Notebook (or other jupyter-based notebooks) with [Graphic Walker](https://github.com/Kanaries/graphic-walker), a different type of open-source alternative to Tableau. It allows data scientists to analyze data and visualize patterns with simple drag-and-drop operations.

Visit [Google Colab](https://colab.research.google.com/drive/171QUQeq-uTLgSj1u-P9DQig7Md1kpXQ2?usp=sharing), [Kaggle Code](https://www.kaggle.com/asmdef/pygwalker-test), [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Kanaries/pygwalker/main?labpath=tests%2Fmain.ipynb) or [Graphic Walker Online Demo](https://graphic-walker.kanaries.net/) to test it out!
Visit [Google Colab](https://colab.research.google.com/drive/171QUQeq-uTLgSj1u-P9DQig7Md1kpXQ2?usp=sharing), [Kaggle Code](https://www.kaggle.com/asmdef/pygwalker-test) or [Graphic Walker Online Demo](https://graphic-walker.kanaries.net/) to test it out!

> If you prefer using R, you can check out [GWalkR](https://github.com/Kanaries/GWalkR) now!

Expand Down Expand Up @@ -95,6 +95,8 @@ See [conda-forge feedstock](https://github.com/conda-forge/pygwalker-feedstock)

## Use pygwalker in Jupyter Notebook

### Quick Start

Import pygwalker and pandas to your Jupyter Notebook to get started.

```python
Expand All @@ -105,27 +107,33 @@ import pygwalker as pyg
You can use pygwalker without breaking your existing workflow. For example, you can call up Graphic Walker with the dataframe loaded in this way:

```python
df = pd.read_csv('./bike_sharing_dc.csv', parse_dates=['date'])
df = pd.read_csv('./bike_sharing_dc.csv')
walker = pyg.walk(df)
```

When you use pygwalker(>=0.2.0), we recommend using pygwalker by this way, more about pygwalker0.2.0: [here](https://docs.kanaries.net/en/pygwalker/changelog/pygwalker-0-2).
### Better Practice

```python
df = pd.read_csv('./bike_sharing_dc.csv', parse_dates=['date'])
walker = pyg.walk(df, spec="config.json", use_preview=True)

# when pygwalker >= 0.3.0, you can use duckdb as computing engine, it can support larger datas and faster response.
walker = pyg.walk(df, spec="config.json", use_preview=True, use_kernel_calc=True)
df = pd.read_csv('./bike_sharing_dc.csv')
walker = pyg.walk(
df,
spec="./chart_meta_0.json", # this json file will save your chart state, you need to click save button in ui mannual when you finish a chart, 'autosave' will be supported in the future.
use_kernel_calc=True, # set `use_kernel_calc=True`, pygwalker will use duckdb as computing engine, it support you explore bigger dataset(<=100GB).
)
```

You can use pygwalker with polars (since `pygwalker>=0.1.4.7a0`):
```python
import polars as pl
df = pl.read_csv('./bike_sharing_dc.csv',try_parse_dates = True)
walker = pyg.walk(df)
```
You can even try it online, simply visiting [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Kanaries/pygwalker/main?labpath=tests%2Fmain.ipynb), [Google Colab](https://colab.research.google.com/drive/171QUQeq-uTLgSj1u-P9DQig7Md1kpXQ2?usp=sharing) or [Kaggle Code](https://www.kaggle.com/asmdef/pygwalker-test).
### Offline Example

* Notebook Code: [Click Here](https://github.com/Kanaries/pygwalker-offline-example)
* Preview Notebook Html: [Click Here](https://pygwalker-public-bucket.s3.amazonaws.com/demo.html)

### Online Example

* [Kaggle Code For New Pygwalker](https://www.kaggle.com/code/lxy21495892/airbnb-eda-pygwalker-demo)
* [Kaggle Code](https://www.kaggle.com/asmdef/pygwalker-test)
* [Google Colab](https://colab.research.google.com/drive/171QUQeq-uTLgSj1u-P9DQig7Md1kpXQ2?usp=sharing)

***

<!-- ![](https://docs-us.oss-us-west-1.aliyuncs.com/img/pygwalker/screenshot-top-img.png) -->
<!-- ![](https://docs-us.oss-us-west-1.aliyuncs.com/img/pygwalker/1-8ms.gif) -->
Expand Down
4 changes: 0 additions & 4 deletions pygwalker/api/pygwalker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from pygwalker.utils.display import display_html, display_on_streamlit
from pygwalker.utils.randoms import rand_str
from pygwalker.services.global_var import GlobalVarManager
from pygwalker.services.tip_tools import TipOnStartTool
from pygwalker.services.render import (
render_gwalker_html,
render_gwalker_iframe,
Expand Down Expand Up @@ -143,9 +142,6 @@ def display_on_jupyter_use_widgets(self):
use ipywidgets, Display on jupyter notebook/lab.
When the kernel is down, the chart will not be displayed, so use `display_on_jupyter` to share
"""
tips_tool = TipOnStartTool(self.gid, "widgets")
tips_tool.show()

comm = HackerCommunication(self.gid)
preview_tool = PreviewImageTool(self.gid)
data_source = get_max_limited_datas(self.origin_data_source, JUPYTER_WIDGETS_BYTE_LIMIT)
Expand Down
2 changes: 1 addition & 1 deletion pygwalker/api/walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def walk(
return_html: bool = False,
spec: str = "",
show_cloud_tool: bool = False,
use_preview: bool = False,
use_preview: bool = True,
store_chart_data: bool = False,
use_kernel_calc: bool = False,
**kwargs
Expand Down