Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Toward Automatic Generation of SPARQL Result Set Visualizations A Use Case in Service Monitoring Leida Marcello EBTIC (Eti...
Introduction <ul><li>Semantic Web is experiencing an interesting phase. </li></ul><ul><li>The vision has finally shift fro...
Value for Enterprises? <ul><li>Potential of Semantic Web understood by the academic/reseach community but difficulties to ...
Federated queries Enabling interesting scenarios even without AI support: “ Query WiMAX customer complains, together with ...
<ul><li>Need to display information in an efficient way: </li></ul><ul><li>no need to understand the ontological model by ...
Ontology Visualization: the Graph <ul><li>Two main approaches to the visualization of ontological data: </li></ul><ul><li>...
Ontology Visualization: the Graph <ul><li>Pros: </li></ul><ul><li>Generic process that automatically suits all the ontolog...
Ontology Visualization: query Results <ul><li>Visualisation of query results: </li></ul>
Ontology Visualization : query Results <ul><li>Query results mapped to the visualisation library through a process defined...
Ontology Visualization : query Results <ul><ul><li>Pros: </li></ul></ul><ul><ul><li>Very expressive and effective views; <...
From static to dynamic visualisations <ul><li>Fresnel ( http://www.w3.org/2005/04/fresnel-info/ ) proposes a solution for ...
Limits of available approaches <ul><li>Oriented toward browsing ontologies and not on displaying query results. </li></ul>...
Missing Step <ul><li>Consider an ontology representing  customers ,  products  and  orders  and a  SPARQL query  that retu...
Proposed Approach: overview of the system <ul><li>The user will generate a SPARQL query by interacting with the GUI or exp...
Proposed Approach: Labels Ontology <ul><li>The proposed architecture is supported by a set of ontologies that are used to ...
Proposed Approach: Chart Ontology The Chart Ontology imports the Label Ontology. This ontology defines the concept of  Res...
Proposed Approach: Chart Ontology Equivalent Concepts and Rules definition The Chart Ontology is at the core of the infere...
Proposed Approach: instances of VisualizationMethod <ul><li>Instances of the ontologies are generated from two independent...
Proposed Approach: instances of ResultSet <ul><li>Instances of the  ResultSet  concept are created by the  Semantic Binder...
Proposed Approach: chart creation process <ul><li>The inference process will  re-classify  the instances of  ResultSet  an...
Proposed Approach: implementation <ul><li>Our approach is not bounded to any specific enabling technology: </li></ul><ul><...
Use case: services monitoring <ul><li>PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> </li></ul><ul><li>PREFIX db:<htt...
Use case: services monitoring PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> PREFIX db:<http://localhost:2020/resourc...
Conclusions & Future Work We presented a promising approach for the automatic generation of charts from SPARQL queries. Sy...
Thank you for your attention!
Upcoming SlideShare
Loading in …5
×

Toward Automatic Generation of SPARQL result set Visualizations

3,312 views

Published on

The problem of representing RDF data using charts, dashboards, maps and so on has become pressing, in particular to prove the value of the Semantic Web to enhance the analysis of business data.
State of the art solutions focus on mapping query results to a specific chart type or view and then manually writing the procedure that creates the final dashboard.
Whenever a different visualization model is required, the mapping process needs to be repeated.
Furthermore, even if several different mappings are pre-defined and available to the user there may be several situations which cannot be predicted because they depend on the specific analysis the user wants to carry out.
In this paper we propose a semi-automatic approach that generates various charts from SPARQL queries over data represented as RDF graphs, we introduce and describe the generic approach and present a use case scenario in the context of service monitoring.

Published in: Education
  • Be the first to comment

Toward Automatic Generation of SPARQL result set Visualizations

  1. 1. Toward Automatic Generation of SPARQL Result Set Visualizations A Use Case in Service Monitoring Leida Marcello EBTIC (Etisalat BT Innovation Centre), Khalifa University - Abu Dhabi, U.A.E. http://www.ebtic.org [email_address]
  2. 2. Introduction <ul><li>Semantic Web is experiencing an interesting phase. </li></ul><ul><li>The vision has finally shift from the definition of languages and tools supporting the vision, to a phase where data is made available from sparse sources. </li></ul><ul><li>Leading to and led by projects such Linked Open Data . </li></ul>
  3. 3. Value for Enterprises? <ul><li>Potential of Semantic Web understood by the academic/reseach community but difficulties to stream down the benefits to Enterprises. </li></ul><ul><li>However Enterprises’ interest on Semantic Web technologies is growing: </li></ul><ul><li>Use of Linked Data sets seems at the moment more appealing than the use of Semantic Web technologies as support for AI (OWL, SWRL). </li></ul><ul><li>Accessing virtually infinite source of information and link it with internal one. </li></ul>
  4. 4. Federated queries Enabling interesting scenarios even without AI support: “ Query WiMAX customer complains, together with related location and weather situation of the day of the complain; this may lead to discovering that some devices do not perform well in some particular conditions.”
  5. 5. <ul><li>Need to display information in an efficient way: </li></ul><ul><li>no need to understand the ontological model by the final user; </li></ul><ul><li>need to represent data as meaningful visualisations, understandable by managers and business analysts; </li></ul><ul><li>allow dynamic exploration of internal data integrated with Linked Data; </li></ul><ul><li>analyze possibilities offered by semantic information to enhance and automate the data visualisation process. </li></ul><ul><li>Furthermore actual BI dashboards are generated by manually mapping queries with the visualization. Changing the query will require changes in the mapping  time and resource consuming. </li></ul>Creating Value
  6. 6. Ontology Visualization: the Graph <ul><li>Two main approaches to the visualization of ontological data: </li></ul><ul><li>Visualization of the Graph: </li></ul><ul><ul><li>exploit the subject, predicate, object pattern to create network-like views of ontologies; </li></ul></ul><ul><ul><li>first approaches to support research community. </li></ul></ul>
  7. 7. Ontology Visualization: the Graph <ul><li>Pros: </li></ul><ul><li>Generic process that automatically suits all the ontologies. </li></ul><ul><li>Graph and network visualization algorithms can be used </li></ul><ul><li>Cons: </li></ul><ul><li>Not interesting from a reporting point of view. </li></ul>
  8. 8. Ontology Visualization: query Results <ul><li>Visualisation of query results: </li></ul>
  9. 9. Ontology Visualization : query Results <ul><li>Query results mapped to the visualisation library through a process defined manually; </li></ul>Convert SPARQL Query results Construct SPARQL Query Identify RDF data
  10. 10. Ontology Visualization : query Results <ul><ul><li>Pros: </li></ul></ul><ul><ul><li>Very expressive and effective views; </li></ul></ul><ul><ul><li>Display only what is relevant; </li></ul></ul><ul><ul><li>Easy to understand; </li></ul></ul><ul><ul><li>No need to know anything about ontologies. </li></ul></ul><ul><ul><li>Cons: </li></ul></ul><ul><ul><li>Need of a specific process, defined manually, to translate query results to a format that can be digested by the visualisation library; </li></ul></ul><ul><ul><li>Imply knowledge of the data source to display; </li></ul></ul><ul><ul><li>Visualization is created as result of a query, but it cannot be refined or lead dynamically to other visualizations. </li></ul></ul>
  11. 11. From static to dynamic visualisations <ul><li>Fresnel ( http://www.w3.org/2005/04/fresnel-info/ ) proposes a solution for browsing ontologies: </li></ul><ul><li>Lenses : what to display; </li></ul><ul><li>Formats : how to display it. </li></ul><ul><li>Possible to define more than one format for each lens. </li></ul><ul><li>Browsers apply the Fresnel document to the ontology in order to obtain the CSS. </li></ul><ul><li>Extremely Powerful! </li></ul>
  12. 12. Limits of available approaches <ul><li>Oriented toward browsing ontologies and not on displaying query results. </li></ul><ul><li>Fresnel allows selectors: but FSL and SPARQL used within Fresnel must always return exactly one node set, meaning that only one variable is allowed in the SELECT clause. This reflects also to other approaches based on Fresnel (e.g. Pazienza et al. Semi-Automatic Generation of GUIs for RDF Browsing ) </li></ul><ul><li>SPARQL Web Pages form TopQuadrant (with the UISPIN Charts Extension) is the closest approach but still relies on declarative mapping between the query and the visualization library. </li></ul>
  13. 13. Missing Step <ul><li>Consider an ontology representing customers , products and orders and a SPARQL query that returns the revenue of the orders for every country a customer is located. The result of the query are values from attributes belonging to different concepts, not directly in relation. </li></ul><ul><ul><ul><ul><ul><li>PREFIX ebtic:<http://www.ebtic.org/OTMDemo#> </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>SELECT ?country ?revenue </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>WHERE { ?location ebtic:Country ?country. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li> ?customer ebtic:location ?location. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li> ?order ebtic:orderedBy ?customer. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li> ?order ebtic:TotalPrice ?revenue.} </li></ul></ul></ul></ul></ul><ul><li>How do I display this? </li></ul><ul><li>Can I exploit semantic information to automatically display such information in the correct way? More information is required!! </li></ul>
  14. 14. Proposed Approach: overview of the system <ul><li>The user will generate a SPARQL query by interacting with the GUI or explicitly submitting it to the system. </li></ul><ul><li>The Query is executed by the SPARQL query engine and the result set is retrieved. </li></ul><ul><li>The query and its results set is analysed by the Semantic Binder and semantically annotated with information regarding the types involved in the Result Set. </li></ul><ul><li>A rule based inference process supported by external ontologies is used to select the set of most suitable charts that are able to visualize the query results. </li></ul><ul><li>The results set returned by the query is merged with the chart template in order to generate the final instance of the chart to display. </li></ul>
  15. 15. Proposed Approach: Labels Ontology <ul><li>The proposed architecture is supported by a set of ontologies that are used to model semantically the SPARQL query. </li></ul><ul><li>The Label ontology is used to annotate the query results set by modelling the semantic of every variable in the SPARQL query. </li></ul><ul><li>This is a basically a hierarchy of datatypes. </li></ul>
  16. 16. Proposed Approach: Chart Ontology The Chart Ontology imports the Label Ontology. This ontology defines the concept of ResultSet and VisualizationMethod . Which are the basic concepts used to model the query and the method used to visualize the results. The variables in the results set are instances of the Label Ontology.
  17. 17. Proposed Approach: Chart Ontology Equivalent Concepts and Rules definition The Chart Ontology is at the core of the inference process. Here the various rules (SWRL) and equivalent concepts (defined using OWL-DL) are defined. These rules and logic concepts are used in the inference process in order to automatically infer the set of suitable visualization for a given result set. The concept of ResultSet is extended by equivalent concepts: An inference process will re-classify the instances of the ResultsSet with the equivalent concepts. Once this is done the system will apply the rules:
  18. 18. Proposed Approach: instances of VisualizationMethod <ul><li>Instances of the ontologies are generated from two independent processes: one process that is defined offline and relate to prepare the system to be used with a specific Chart API and another one that is executed runtime once the queries are submitted to the system. </li></ul><ul><li>The first of this processes will create the instances of the Chart Ontology . These are defined as instances of the sub concepts of VisualizationMethod concept with also specific attributes depending on the API used to create the Charts (e.g. Yahoo UI Charts, Google Visualization API,…). </li></ul><ul><li>In case of our implementation we used Google Visualization API. Each instance of the specific VisualizatioMethod in this case will contain an attribute visualizationCode containing the template of the code used to create the JavaScript code to display the chart. </li></ul>
  19. 19. Proposed Approach: instances of ResultSet <ul><li>Instances of the ResultSet concept are created by the Semantic Binder process. This process analyses the SPARQL query and the returned results set and creates instances of the ResultSet concept representing the query and instances of the Label concept representing the variables of the query. </li></ul><ul><ul><li>The binding between the variable and a concept in the Label ontology hierarchy can be done performed in may ways: by a manual process, an automatic or a semi-automatic process. </li></ul></ul><ul><ul><li>In our implementation we analyse the results set using a set of techniques: e.g. regular expressions associated to a certain Label (e.g. Dates, Numbers) or lookup lists in case of fixed value sets (e.g. Country). </li></ul></ul>
  20. 20. Proposed Approach: chart creation process <ul><li>The inference process will re-classify the instances of ResultSet and apply the rules in order to link instances of ResultSet and VisualizeMethod with the visualizeWith relation. It is important that the inferred information is made persistent in the Chart Ontology. </li></ul><ul><li>The system will extract the suitable template code for the visualization methods, given a specific result set, by executing a SPARQL query on the Chart Ontology with instances: </li></ul><ul><ul><li>PREFIX chart:<http://www.ebtic.org/bpm/visualizationOntology.owl#> </li></ul></ul><ul><ul><li>PREFIX instance:<http://www.ebtic.org/bpm/serviceMonitoring.owl#> </li></ul></ul><ul><ul><li>SELECT ?visualizationCode </li></ul></ul><ul><ul><li>WHERE { ?resultSet chart:visualizeWith ?visualizationMethod. </li></ul></ul><ul><ul><ul><ul><li>?visualizationMethod chart:visualizationCode ?visualizationCode. </li></ul></ul></ul></ul><ul><ul><li>FILTER (?resultSet = instance:ResultSetQuery1)} </li></ul></ul>
  21. 21. Proposed Approach: implementation <ul><li>Our approach is not bounded to any specific enabling technology: </li></ul><ul><li>For proof of concept prototype in the domain of service monitoring we used Ruby. </li></ul><ul><li>OWLIM is used to store and query the supporting ontologies (Label, Chart and Instances) together with the rules and OWL equivalent concepts. </li></ul><ul><li>Since originally Service Monitoring data is in a relational database we used D2R to provide a SPARQL endpoint to the database. </li></ul><ul><li>Our system at the moment offer to the user a choice between two graphs which are each one mapped to a SPARQL query on the D2R server. </li></ul><ul><li>The Query is analised by our system supported by the OWLIM inference process and SPARQL engine used to extract the code template. </li></ul><ul><li>Code template is processed by Ruby and the results of the query on the D2R server are integrated with the template and the final HTML is returned to the user. </li></ul>
  22. 22. Use case: services monitoring <ul><li>PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> </li></ul><ul><li>PREFIX db:<http://localhost:2020/resource/> </li></ul><ul><li>PREFIX owl:<http://www.w3.org/2002/07/owl#> </li></ul><ul><li>PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> </li></ul><ul><li>PREFIX map:<file:/D:/d2r-server-0.7/mapping.n3#> </li></ul><ul><li>PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> </li></ul><ul><li>PREFIX vocab:<http://localhost:2020/vocab/resource/> </li></ul><ul><li>SELECT ?serviceEndPoint ?messageType </li></ul><ul><li>(COUNT(?messageType) AS ?countMessageType) </li></ul><ul><li>WHERE { </li></ul><ul><li>?monitor vocab:result_serviceEndpoint ?serviceEndPoint. </li></ul><ul><li>?monitor vocab:result_messageType ?messageType.} </li></ul><ul><li>GROUP BY ?serviceEndPoint ?messageType </li></ul><ul><li>ORDER BY ?serviceEndPoint ?messageType </li></ul>
  23. 23. Use case: services monitoring PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> PREFIX db:<http://localhost:2020/resource/> PREFIX owl:<http://www.w3.org/2002/07/owl#> PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> PREFIX map:<file:/D:/d2r-server-0.7/ServMonMapping.n3#> PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX vocab:<http://localhost:2020/vocab/resource/> SELECT ?serviceEndPoint ?avgeResponseTime ?timestamp WHERE { ?monitor vocab:result_timestamp ?timestamp. ?monitor vocab:result_serviceEndpoint ?serviceEndPoint. ?monitor vocab:result_averageResponseTime ?avgeResponseTime. } ORDER BY ?serviceEndPoint ?timestamp ?avgeResponseTime
  24. 24. Conclusions & Future Work We presented a promising approach for the automatic generation of charts from SPARQL queries. System exploits inference processes to generate appropriate charts. Major benefit is the automatic on-the-fly generation of charts. Future work will consider extending the proof of concept implementation presented in this paper to a generic framework. Capture user interaction with the chart in order to automatically generate new SPARQL queries that will consequently lead to new views of the data; interesting in the case where the data to analyze can be linked to an external data such as Linked Data Project. Our approach is particularly relevant in with Linked Data, where the queries that can be submitted can not be predicted at design time because of the high dimensionality and the highly connected nature of the data. This, in turn, may lead to the visualization of data that initially was not considered, which is a situation that current BI systems can not handle.
  25. 25. Thank you for your attention!

×