zenvisage: Effortless Visual Data Exploration

Tarique Siddiqui, Albert Kim, John Lee, Karrie Karahalios, Aditya G. Parameswaran

Abstract

Visual data exploration is a cornerstone of data science, yet it remains a manual, iterative process. Current tools excel at single-plot generation but falter when users need to search through thousands of potential visualizations for specific patterns. This paper introduces zenvisage, a system that treats visualizations as first-class queryable objects. By leveraging a novel tabular query language, ZQL, and a specialized backend optimizer, zenvisage enables users to find visual trends across massive datasets with significantly higher speed and accuracy than traditional manual methods.

Introduction

The "trial-and-error" nature of visual analytics often leads to a bottleneck in data science workflows. Analysts frequently find themselves manually inspecting hundreds of charts to identify a specific trend—such as a specific correlation or a decreasing profit margin. Tools like Tableau or Matplotlib are designed for creation, not large-scale search. zenvisage addresses this gap by formalizing visual patterns into a queryable framework, allowing users to operate on collections of visualizations rather than individual data points.

ZQL: A Language for Visual Patterns

At the heart of zenvisage is ZQL (Zee-quel), a tabular query language inspired by Query-by-Example (QBE). ZQL allows users to define visualization collections and operations through a structured table format.

ZQL structure diagram identifying Identifier, Visualization Collection, and Operation components.

As shown in the figure above, a ZQL query consists of five main columns:

  • X & Y: Define the axes of the visualization.
  • Z: Defines the data subset or grouping variable (e.g., 'product').
  • Viz: Defines the chart type and aggregation method.
  • Process: High-level operations like argmax or similarity searches.

For example, to generate a collection of bar charts showing total sales by year for every product in a dataset, a user would write a query like the one below:

An example ZQL query generating a collection of bar charts for all products.

Functional Primitives

ZQL is built on two mathematical primitives:

  1. Trend ($T(f)$): A function that measures properties of a single plot (e.g., "is the slope positive?").
  2. Distance ($D(f, f')$): A function that quantifies the difference between two plots (e.g., Euclidean distance), enabling "find similar" queries.

System Architecture and Optimization

Executing visual queries across millions of rows can be computationally expensive. zenvisage employs a backend optimizer with three core strategies:

  1. Parallelization: Executing independent SQL queries concurrently to maximize throughput.
  2. Speculation: Pre-emptively fetching a "superset" of data for axis variables. This reduces the number of round-trips to the database, as the system "bets" on which data will be needed next.
  3. SmartFuse (Query Combination): Merging multiple small SQL queries into a single large query. This minimizes the fixed overhead associated with the database engine's query processing.

Evaluation and Results

The authors evaluated zenvisage using real-world airline data (20 million records), synthetic datasets, and a housing dataset for user studies.

  • Performance: The "SmartFuse" optimization yielded up to a 3x speedup. On a columnar database like Vertica, the system achieved sub-second response times for complex queries on 1.5GB of data.
  • User Efficiency and Accuracy: In a study with 12 data scientists, zenvisage users were 50% faster than those using manual exploration. More importantly, accuracy improved from 69.9% to 96.3%, as the system automated the tedious search for visual "needles in a haystack."
  • Conciseness: Tasks requiring 38 lines of Python code could be expressed in just 4 lines of ZQL.

Conclusion

zenvisage represents a paradigm shift from "querying data to see a plot" to "querying the plots themselves." By formalizing a Visual Exploration Algebra and providing an optimized execution engine, it significantly reduces the friction of large-scale data exploration. While future work aims to address I/O bottlenecks and incorporate Approximate Query Processing (AQP), zenvisage already provides a robust foundation for the next generation of visual analytics tools.

Summary updated

BibTeX
@article{siddiqui2016zenvisage,
  author = {Tarique Siddiqui and Albert Kim and John Lee and Karrie Karahalios and Aditya G. Parameswaran},
  title = {{zenvisage: Effortless Visual Data Exploration}},
  journal = {Proc. VLDB Endow.},
  year = {2016},
  doi = {10.14778/3025111.3025126},
}
Figure