DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to turn charts you built by hand into reproducible code with Pygwalker

Save chart state with spec_path, then export it with to_code or as PNG and SVG files.

Short answer: Open the walker with a spec file: walker = pyg.walk(df, spec_path="./chart_meta_0.json"); then build your chart in the UI and click the save button; export the image with walker.save_chart_to_file("Chart 1", "chart1.svg", save_type="svg") or export_chart_png. All steps.

Who it is forA data scientist who explored visually and now needs the same charts in a report or pipeline.

The problemCharts made by clicking around are hard to reproduce or put under version control.

The outcomeSaved chart configs plus Python code and image files you can commit and rerun.

What you need first

  • Python with pandas, polars or pyarrow data
  • Jupyter Notebook, JupyterLab, Colab or Kaggle, or Streamlit for a web app
  • pip, conda or mamba to install

Steps

  1. Open the walker with a spec file: walker = pyg.walk(df, spec_path="./chart_meta_0.json")
  2. Build your chart in the UI and click the save button
  3. Export the image with walker.save_chart_to_file("Chart 1", "chart1.svg", save_type="svg") or export_chart_png
  4. Get reproducible Python with code = walker.to_code(dataset_name="df")
  5. Migrate older saved specs with pyg.spec.migrate before committing them

Prompt for your agent

With Kanaries/pygwalker, open <dataframe> with a spec_path, and once I have saved <chart name> in the UI, export it to SVG and PNG and generate the reproducible code with to_code. Put the code in <script file>.

Caveat. Chart export works on charts saved from the UI, so save first and then export.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Kanaries/pygwalker and "Turn charts you built by hand into reproducible code"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer