VizSmith: Automated Visualization Synthesis by Mining Data-Science Notebooks
Rohan Bavishi, Shadaj Laddad, Hiroaki Yoshida, Mukul R. Prasad, Koushik Sen
Abstract
Visualizations are widely used to communicate findings and make data-driven decisions. Unfortunately creating bespoke and reproducible visualizations requires the use of procedural tools such as matplotlib. These tools present a steep learning curve as their documentation often lacks sufficient usage examples to help beginners get started or accomplish a specific task. Forums such as StackOverflow have long helped developers search for code online and adapt it for their use. However, developers still have to sift through search results and understand the code before adapting it for their use. We built a tool called VIZSMITH which enables code reuse for visualizations by mining visualization code from Kaggle notebooks and creating a database of 7176 reusable Python functions. Given a dataset, columns to visualize and a text query from the user, VIZSMITH searches this database for appropriate functions, runs them and displays the generated visualizations to the user. At the core of VIZSMITH is a novel metamorphic testing based approach to automatically assess the reusability of functions, which improves end-to-end synthesis performance by 10% and cuts the number of execution failures by 50%. def visualization(df, col1, col2): import pandas as pd import matplotlib.pyplot as plt import seaborn as sns sns.set() tab = pd.crosstab(df0[col1], df0[col2]) tab.div(tab.sum(1).astype(float), axis=0) .plot(kind="bar", stacked=True) plt.ylabel('Text-1') plt.title('Text-2') visualization(df=df, col1='Operator', col2='Call Drop Category') A B C Create new cell with code Full Screen View
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Integrated Visualization Editing via Parameterized Declarative Templates cites Visualization by example
- On the Design of AI-powered Code Assistants for Notebooks cites Integrated Visualization Editing via Parameterized Declarative Templates
- Contextualized Data-Wrangling Code Generation in Computational Notebooks cites Language Models are Few-Shot Learners
- Contextualized Data-Wrangling Code Generation in Computational Notebooks cites PlotCoder: Hierarchical Decoding for Synthesizing Visualization Code in Programmatic Context
- PlotCoder: Hierarchical Decoding for Synthesizing Visualization Code in Programmatic Context cites Falx: Synthesis-Powered Visualization Authoring
Cited by top-tier papers2
- On the Design of AI-powered Code Assistants for NotebooksAndrew M. McNutt, Chenglong Wang, Robert A. DeLine, Steven Mark DruckerCHI 2023 · 78 citations
- Contextualized Data-Wrangling Code Generation in Computational NotebooksJunjie Huang, Daya Guo, Chenglong Wang, Jiazhen Gu et al.ASE 2024 · 5 citations
Builds on5
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Integrated Visualization Editing via Parameterized Declarative TemplatesAndrew M. McNutt, Ravi ChughCHI 2021 · 39 citations
- Visualization by exampleChenglong Wang, Yu Feng, Rastislav Bodík, Alvin Cheung et al.POPL 2020 · 36 citations
- Falx: Synthesis-Powered Visualization AuthoringChenglong Wang, Yu Feng, Rastislav Bodík, Isil Dillig et al.CHI 2021 · 35 citations
- PlotCoder: Hierarchical Decoding for Synthesizing Visualization Code in Programmatic ContextXinyun Chen, Linyuan Gong, Alvin Cheung, Dawn SongACL 2021
Related papers
- RGVisNet: A Hybrid Retrieval-Generation Neural Framework Towards Automatic Data Visualization GenerationYuanfeng Song, Xuefang Zhao, Raymond Chi-Wing Wong, Di JiangKDD 2022 · 28 citations
- Assessing and Restoring Reproducibility of Jupyter NotebooksJiawei Wang, Tzu-yang Kuo, Li Li, Andreas ZellerASE 2020 · 68 citations
- Metrics-Based Evaluation and Comparison of Visualization NotationsNicolas Kruchten, Andrew M. McNutt, Michael J. McGuffinIEEE VIS 2023 · 8 citations
- VizGenie: Toward Self-Refining, Domain-Aware Workflows for Next-Generation Scientific VisualizationAyan Biswas, Terece L. Turton, Nishath Rajiv Ranasinghe, Shawn M. Jones et al.IEEE VIS 2025 · 1 citation
- UNCHARTIT: An Interactive Framework for Program Recovery from ChartsDaniel Ramos, Jorge Pereira, Inês Lynce, Vasco Manquinho et al.ASE 2020 · 6 citations
