DataVizard: Recommending Visual Presentations for Structured Data

Rema Ananthanarayanan, Pranay Kr. Lohia, Srikanta Bedathur · DOI

Abstract

Selecting the appropriate visual presentation of the data such that it preserves the semantics of the underlying data and at the same time provides an intuitive summary of the data is an important, often the final step of data analytics. Unfortunately, this is also a step involving significant human effort starting from selection of groups of columns in the structured results from analytics stages, to the selection of right visualization by experimenting with various alternatives. In this paper, we describe our DataVizard system aimed at reducing this overhead by automatically recommending the most appropriate visual presentation for the structured result. Specifically, we consider the following two scenarios: first, when one needs to visualize the results of a structured query such as SQL; and the second, when one has acquired a data table with an associated short description (e.g., tables from the Web). Using a corpus of real-world database queries (and their results) and a number of statistical tables crawled from the Web, we show that DataVizard is capable of recommending visual presentations with high accuracy. We also present the results of a user survey that we conducted in order to assess user views of the suitability of the presented charts vis-a-vis the plain text captions of the data.

Introduction

While data analysis pipelines have become highly automated, selecting the right visualization remains a manual, high-effort task. Users often struggle to choose between bar charts, line graphs, or scatter plots, frequently relying on trial and error.

Existing tools like Excel or Google Sheets offer "suggested charts," but these are often "dumb"—they are highly sensitive to the order of columns and ignore the rich semantic context provided by table headers, captions, or the SQL queries used to generate the data. The authors aim to reduce this overhead by creating a system that understands what the data represents before suggesting how to show it.

Methodology

DataVizard employs a two-pronged approach depending on the data source:

  1. SQL Query Analysis: For database results, the system parses the SQL query itself. It treats GROUP BY clauses as indicators of independent variables (X-axis) and aggregate functions (like SUM or AVG) as dependent variables (Y-axis). It identifies 21 specific features, such as whether a field is time-related or if multiple categories are being compared.
  2. NLP for Web Tables: For tables without queries (like those found on the web), DataVizard uses the Stanford Natural Language Parser to analyze table captions. It extracts noun phrases and uses word2vec embeddings to determine if a noun represents a quantity (e.g., "revenue," "amount") or a category (e.g., "country," "product").
  3. Recommendation Engine: These features are fed into a Random Forest classifier. Unlike simple rule-based systems, this model learns the "best practices" of visual statistics to map data features to specific chart types (Line, Bar, Pie, Scatter, etc.).

Evaluation and Results

The authors evaluated DataVizard using several diverse datasets, including the TPC-H Benchmark, a financial services workload of 68 complex SQL queries, and a corpus of 550 Statista web tables. Additionally, a user survey with 114 participants was conducted to validate the "ground truth" of visual suitability.

Key results include:

  • High Accuracy: For SQL queries, the system achieved a 95.5% accuracy for its top recommendation. For web tables with captions, the accuracy reached 97.2%.
  • Robustness: The Random Forest model proved stable across different "k-fold" cross-validations, suggesting the features selected (like "presence of multiple group by" or "is numeric") are highly predictive of the correct chart type.
  • User Alignment: The user survey confirmed that DataVizard’s recommendations align closely with human intuition, particularly in recognizing that time-series data demands line charts and categorical data demands bar charts.

Discussion: The Power of Semantics

A core insight of this work is that the intent of a visualization is often hidden in the metadata (the query or the caption) rather than the raw numbers. For example, a caption containing "from 2010 to 2015" strongly implies a line chart is needed to show a trend.

Standard spreadsheet tools are highly sensitive to column order, often changing the recommended chart type based on position rather than semantics.

Unlike standard spreadsheet tools, DataVizard identifies independent and dependent variables regardless of their column position in the result set. As shown in the figure above, traditional tools may switch between a bar chart and a scatter plot simply because columns were swapped, whereas DataVizard maintains semantic consistency. Furthermore, DataVizard proves that analyzing noun phrases (the "what") is often sufficient to infer the "how" without explicit user instructions like "compare."

Conclusion

DataVizard demonstrates that automated visualization recommendation can achieve high accuracy by leveraging semantic metadata. While the current system focuses on 2-3 variables and simple chart types, it addresses the "last mile" of data analytics effectively. Future work includes expanding the repertoire of supported charts (e.g., heatmaps) and using more advanced data value analysis to automatically suggest data aggregations, making the final visual presentation even more meaningful.

Summary updated

BibTeX
@inproceedings{ananthanarayanan2017datavizard,
  author = {Rema Ananthanarayanan and Pranay Kr. Lohia and Srikanta Bedathur},
  title = {{DataVizard: Recommending Visual Presentations for Structured Data}},
  booktitle = {WebDB},
  year = {2017},
  doi = {10.1145/3201463.3201465},
}
Figure