Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
March 28, 2021 11:49
May 23, 2021 14:02
August 11, 2021 11:12
March 28, 2021 10:48

nvBench: Natural Language to Visualization (NL2VIS) Benchmarks

nvBench is a large dataset for complex and cross-domain NL2VIS task, which covers 105 domains, supports seven common types of visualizations, and contains 25,750 (NL, VIS) pairs. This repository contains the corpus of NL2VIS, with JSON format and Vega-Lite format.

Introduction to nvBench

  • nvBench.json stores the JSON format of (NL, VIS) pairs in the nvBench benchmark.

  • nvBench_VegaLite contains all (NL, VIS) pairs in the nvBench benchmark, and renders the VIS using the Vega-Lite visualization library.

  • database contains all databases used by the NVBench benchmark.


(NL, VIS) JSON format

Each (NL, VIS) pair is denoted as a JSON object in NVBench.json, with the following fields:

  • key: the id of the (NL, VIS) pair in NVBench benchmark
  • vis_query: contains the query for VIS, with two parts: vis_part and data_part.
  • chart: the visualization types: Bar, Pie, Line, Scatter, Stacked Bar, Grouping Line, and Grouping Scatter.
  • db_id: the visualization comes from which database.
  • vis_obj: the JSON format for representing a visualization object, with chart (chart type), x_name (name of the X-axis), y_name(name of the Y-axis), x_data (data for the X-axis), y_data (data for the Y-axis), classify (Z-axis data, for stacked bar, grouping line, and grouping scatter chart.)
  • nl_queries: contains the NL queries for querying this visualization object.

Below is an example:

"8": {
        "vis_query": {
            "vis_part": "Visualize PIE",
            "data_part": {
                "sql_part": "SELECT Rank , COUNT(Rank) FROM Faculty GROUP BY Rank",
                "binning": ""
            "VQL": "Visualize PIE SELECT Rank , COUNT(Rank) FROM Faculty GROUP BY Rank"
        "chart": "Pie",
        "hardness": "Easy",
        "db_id": "activity_1",
        "vis_obj": {
            "chart": "pie",
            "x_name": "Rank",
            "y_name": "CNT(Rank)",
            "x_data": [
            "y_data": [
            "classify": [],
            "describe": "GROUP BY Rank"
        "nl_queries": [
            "A pie chart showing the number of faculty members for each rank.",
            "What is the number of the faculty members for each rank? Return a pie.",
            "Compute the total the number of rank across rank as a pie chart."


When you use the nvBench dataset and the corresponding baseline models, we would appreciate it if you cite the following:

  author    = {Yuyu Luo and
               Nan Tang and
               Guoliang Li and
               Chengliang Chai and
               Wenbo Li and
               Xuedi Qin},
  title     = {Synthesizing Natural Language to Visualization (NL2VIS) Benchmarks from NL2SQL Benchmarks},
  booktitle = {Proceedings of the 2021 International Conference on Management of
               Data, {SIGMOD} Conference 2021, June 20–25, 2021, Virtual Event, China},
  publisher = {{ACM}},
  year      = {2021},

NL2VIS Baselines

Please adapt the Seq2Seq Baselines at the Spider repository. Replace the data preprocessing part and fed the (NL, VIS) pairs of nvBench for training and testing.


For more details, please refer to our research paper.


# Contributor Affiliation Contact
1 Guoliang Li Professor, Tsinghua University
2 Nan Tang Senior Scientist, Qatar Computing Research Institute
3 Yuyu Luo PhD Student, Tsinghua University
If you have any questions or feedbacks about this project, please feel free to contact Yuyu Luo (


nvBench is available under the MIT license.


No description, website, or topics provided.






No releases published


No packages published