Visualized Query Results

 

Query results have traditionally been represented in tabular form. This is mainly because queries are dominantly used to operate on relational data. Also, visual appearance of these tabular representations make them easier to understand. In scientific data-intensive researches where data changes frequently, queries are ad-hoc, and selecting the right portion of the incoming data to answer the research question is a part of the experimentation, an early feedback mechanism would be of great help. In traditional systems, researches usually retrieve and format the data in systems with expressive query and data transformation power and then feed the resulting data into visualization tools to draw various types of charts out of it.

QUIS is a lightweight agile querying system that is able to query data from different and heterogeneous systems and directly feed the result into its visualization utility. It uses a language integrated polymorphic result representation, in that a user can issue a query against one or more data sources and request the result to be represented as one of the supported chart types or a traditional tabular form.

The charting is part of the query language and rendering is also embedded in the query execution engine. Therefore, the users do not need to use multiple tools, and more importantly they do not reformat data for the sake of tool compatibility. These helps them to have an agile and early feedback. A sample QUIS query is shown blow:


SELECT FROM dataSource
USING avg(temperature) AS meanTemp, dt.dayOfYear(dateUTC) as dayIndex
INTO PLOT fsoPlot 
    h-axis:dayIndex
    v-axix:meanTemp
    plot-type:line
    h-label:"Day of Year"
    v-label:"Mean Temperature (C)"
    plot-label:"Daily Mean Temperature at SFO in 2014"
ORDER BY dayIndex

The data is retrieved from the dataSource and aggregated to an average per day, as well as ordered by day. The result is routed to a PLOT that renders it as a line chart with the horizontal axis bound to the day of year dayIndex and the vertical axis to the mean temperature meanTemp. The resulting chart is shown below:


quiswb2_chart2

In addition to retrieving data from a source, computing aggregates, ordering, and visualizing the the results, the SELECT statement is able to filter, group by, and apply limit/offset on the results. It additionally provides access to a set of functions such as string manipulation, date/time, mathematics, and statistics. These functions are mainly used for data transformation as well as aggregation and filtering.