- 914 Downloads
KeywordsSPARQL Query Visualization Function Script Life SPARQL Endpoint Page Load
2 Overview of Sgvizler
Sgvizler is lightweight: 31 KB in minified condition and 6 KB minified and gzipped. It relies on external libraries for visualization, endpoint communication and DOM manipulation. Currently, the following chart types and rendering functions are available: quantitative data charts (line chart, area chart, column chart, bar chart, bubble chart, scatter chart, sparkline, pie chart, candlestick chart, motion chart, gauge), hierarchical data charts (tree map, org chart), geographical visualizations (maps, geo chart, geo map), graphs, lists, tables and a generic text rendering function. It is released under an MIT License, and the complete source code, documentation, examples, issues are available at .
2.1 How Does It Work?
The DataTable class serves as input parameter type for all of the chart functions in Google’s Chart Tools. This means that all these charts are readily available for Sgvizler visualization. Additionally, Sgvizler is designed such that any user-defined rendering functions must take a DataTable object as input. This makes it possible to use the same code for handling all visualization functions and easy to register new functions. Also, a DataTable object is equipped with many convenient functions for editing and querying its contents,2 making it a helpful object to render into new representations.
2.2 SPARQL Query Design
When designing SPARQL queries for visualization by Sgvizler, the order of the columns in the result set, i.e., the order of the variables in the SELECT block, is crucial. As indicated by the variable names in the query found in Example 1,3 the sMap function expects the two first columns in the result set to contain respectively the latitude and longitude values of points to plot on the map. The remaining result set columns for sMap set respectively the heading, the body text, a clickable link and the link to an image to place in the fact bubble which appears when the point on the map is selected. Different rendering functions have different requirements on data input format. The data format for each function is described on the Sgvizler homepage .
2.3 Browser and Endpoint Compatibility
3 Future Work
The following future work items have been identified. Technical issues: Reduce page load time with more parallelization of tasks and selective library import. Improve Sgvizler’s “external” API. More graph visualizations: RDF data naturally lends itself especially well for graph visualizations. However, the only graph visualization function available in Sgvizler is currently Force-directed Graph and it is in early development. Linked Data tool integration: Integrate Sgvizler with popular Linked Data SPARQL frontends. Vocabulary sensitivity: Make Sgvizler able to suggest good visualizations based on the vocabulary used by the dataset.
The query is simplified to save space; this and other live examples are found at .
Even though the names of the variables in the example indicate their contents, the actual names are not important for the visualization function.
A list of jQuery supported browsers are available at . Google Chart Tools’ information on the subject is: “Charts are rendered using HTML5/SVG technology to provide cross-browser compatibility (including VML for older IE versions) and cross platform portability to iPhones, iPads and Android” .
- 1.Google Chart Tools. http://code.google.com/apis/chart/
- 2.Guang Zheng, J., Ding, L.: How to render SPARQL results using Google visualization API. December 2011. http://iw.rpi.edu/wiki/How_to_render_SPARQL_results_using_Google_Visualization_API
- 3.Knublauch, H.: SPARQL Web Pages. http://uispin.org/
- 4.Vrandečić, D., Harth. A.: Spark. http://km.aifb.kit.edu/sites/spark/
- 5.Skjæveland, M.G.: Sgvizler. http://code.google.com/p/sgvizler/
- 6.jquery. http://jquery.com/
- 7.Beckett, D., Broekstra, J., (eds.): SPARQL Query Results XML Format. W3C Recommendation, W3C (2008). http://www.w3.org/TR/rdf-sparql-XMLres/
- 8.Grant Clark, K., Feigenbaum, L., Torres, E., (eds.): Serializing SPARQL Query Results in JSON. W3C Working Group Note, W3C (2008). http://www.w3.org/TR/rdf-sparql-json-res/
- 9.Bostock, M.: D3.js. http://mbostock.github.com/d3/
- 10.van Kesteren, A., (ed.): Cross-Origin Resource Sharing. W3C Working Draft, W3C, July 2010. http://www.w3.org/TR/cors/