TC5.14 - Sharing Knowledge base view and queries on ServiceMap and Log.DISIT.org Discover City Entities as Linked Open Data, triples, semantic search.

Test Case Title

TC5.14 - Sharing Knowledge base view and queries on ServiceMap and disit.org">Log.DISIT.org Discover City Entities as Linked Open Data, triples, semantic search.

Goal

Discovering the relationships among city entities, modelled in the knowledge base as graph database, Linked open Data, --> disit.org">LOG.disit.org

Discovering other links and triples in other repositories of Linked Open Data that could be used to enrich the smart city knowledge base in use

Share semantic search performed on the knowledge base.

Establishing reciprocal Links among City Entities into the Knowledge Base

Performing direction SPARQL queries searching for relationships among city entities, semantic search, modelled in the knowledge base as graph database --> FLINT

Prerequisites

Using a PC or Mobile with a web browser. Knowledge about the RDF, OVL concepts. Knowledge about SPARQL. Access to ServiceMap, Knowledge base with data. Several of them are available with different number of data: (i) Florence and whole Tuscany, (ii) Helsinki, Antwerp and Bologna, (iii) Venezia, etc.

The following functionalities are available only for specific Snap4city users with specific privileges.

Expected successful result

The possibility of visually inspecting the graph database structure of the knowledge base to understand the relationships among city entities. From the LOG tools is possible to learn how to formalize SPARQL queries to search into the knowledge base. This approach may be used to extend the Smart City API, or to perform a direct access to the KB to get specific data and relationships, and to share experience with others users. For example, for implementing some data analytics for routing, traffic flow reconstruction, etc. Once learned the semantic queries in SPARQL can be tested using FLINT, the second tool. Please note that the disit.org">LOG.disit.org tool can be used discover Linked Open Data worldwide since a global index is provided. FLINT tool can be used as well on the many SPARQL repository listed in disit.org">LOG.disit.org.

Steps

 

 

Example 1: The drill down on relationships

  1. The drill down on relationships among entities of the Knowledge Base at semantic level can be performed by using ServiceMap and LOG. The ServiceMap allows to perform the initial geographical queries identifying the elements to be inspected at level of entity relationships and triples. Once arrived at the single entity the data view presents a link for jumping to the LOG view.
  2. You can start testing this requirement by following the sequence of actions:
  3. Click on url: https://antwerp.snap4city.org/
  4. You see the ServiceMap centred on Antwerp.

  1. Click the Hide menu on the top right corner to open the menu and to perform a new search into the explored geo space. You can see the menu as the image on the right;
  2. Select the Service Categories of interest by ticking your preferences (1);

  1. Define the N. of results to be shown in the drop-down menu, for example No limit (2);
  2. Set the search range in “Visible area” (3);
  3. Click the first magnifying lens to perform the new query (4);
  4. Click on the disk in the menu of the right side

  1. A dialog appears asking for your email to send you the information about how to ask the same results programmatically. Once you have received them you can share them via email to other colleagues.

 

Thanks a lot for using Service Map by DISIT at https://servicemap.disit.org

Your query "A query" has been saved.

Description:No description provided.

You can access to the query results on Service Map by clicking on these links:

Link for read only result in format json: 'http://snap4city.km4city.org/ServiceMap/api/v1/?queryId=2f4073b2623dee59fc0e37570b3f01ca&format=json' 

Link for read only result in html: 'http://snap4city.km4city.org/ServiceMap/api/v1/?queryId=2f4073b2623dee59fc0e37570b3f01ca&format=html' 

Link for overwrite this query on Service Map: 'http://snap4city.km4city.org/ServiceMap/api/?queryId=616c0310a5b19f1c1531ae86e81592dd' 

Link to obtain results in format json based on the coordinates of selection: 'http://snap4city.km4city.org/ServiceMap/api/v1/?selection=51.207716881223305;4.369211196899414;51.230134691511154;4.433069229125977&categories=Service%3BBusStop%3BSensorSite&maxResults=0&maxDists=0.1&format=json'

Link to obtain results in format html based on the coordinates of selection: 'http://snap4city.km4city.org/ServiceMap/api/v1/?selection=51.207716881223305;4.369211196899414;51.230134691511154;4.433069229125977&categories=Service%3BBusStop%3BSensorSite&maxResults=0&maxDists=0.1&format=html'

or copy paste it on your browser.

You can share the link with your friends.

Best regards

ServiceMap.disit.org team

You can contact us at info@disit.org or visit our web page at http://www.disit.org

 


Example 1a: Discovering semantic model

Go by following the above steps to see the map of Antwerp with many POI. Click on a pin to open the speech bubble containing the information related to the selected service;

  1. Click the Linked Open Graph link and the LOG tool is open in a separate window; (LOG: Linked Open Graph, Https://log.disit.org)
  2. open the detail of the single element identified, and browsing on the graph of relationships.

 


Example 2: Discovering other links and triples in other repositories of Linked Open Data that could be used to enrich the smart city knowledge base in use

it will search for bus stops in a rectangular area

  1. Click on any bus stop pin
  2. Click on the “Linked Open Graph” link appearing on top of the pop of the pin, thus the disit.org">LOG.DISIT.ORG appears as follow

  1. Click on the + to explore the semantic relationships

  1. Right click on the rectangular entity and select Info to see details on the entity


Example 3: Share semantic search performed on the knowledge base.

  1.  


Example 4: Establishing reciprocal Links among City Entities into the Knowledge Base

Open data sets (ingested manually, via DataGate or automatically by ETL) have to be connected to refer to the same entities even if they are produced by different administrations, different databases, different toponimous, etc. This cross link is performed into the Knowledge Base, for example, a bus stop located in a street has to be connected to the street structure, etc. For these reasons, the links into the Knowledge Base among the several entities, have to be automatically established by using mining techniques. Otherwise, different data sets referring to the same city entities in different manner would not be usable as part of the same knowledge base. If the entities are reconciled, it is possible to exploit mechanisms of inference, structural inference, into the Knowledge Base as an expert system [RDFperformance].

  1. You can start testing this requirement by following the sequence of actions: Click on url https://servicemap.km4city.org/WebAppGrafo/api/v1/?serviceUri=http://www.disit.org/km4city/resource/46074516f0a6be05b648d9bf5c991e77&format=html

  1. Click on “LINKED OPEN GRAPH” to see the relations of this entity in the Knowledge Graph

  1. See the relations of this entity with isInRoad relation and hasAccess relation, the first connects the entity with the Road and the second connects with the Entry that is connected with the address number and it has the geographic coordinates.
  2. Exploring the relations, the following graph may be obtained

  1. The navigation result was saved and can be retrieved at the following url: https://log.disit.org/service/?graph=453ad2bf5261655b408819c4397c406b

 


Example 5: The above described sequence can be performed in some other area with HTTPS connections and service as:

https://servicemap.snap4city.org

 


Example 6: Navigating on knowledge base, world wide

disit.org">LOG.DISIT.ORG: can be used to visually navigate into the Knowledge Base and in general in RDF store end-points and save/share the viewed graphs via email with other developers.

  1. To test click on the link to see a live example: https://log.disit.org/service/index.php?uri=http://www.disit.org/km4city/resource/FM0084&sparql=http://192.168.0.206:8890/sparql&keyword=Fermata%20di%20Piazza%20San%20Marco,%20real%20time%20status&multiple_search=false
  2. Expand the initial graph by clicking with the mouse (right button) on the central entity and requesting “+details”

 


Example 7: Performing direction SPARQL queries searching for relationships among city entities, semantic search, modelled in the knowledge base as graph database --> FLINT

Open Flint tool: https://log.disit.org/sparql_query_frontend/

It is a DISIT modified version in which the engine for data licensing verification is also present.

If you click on the button in the circle you just perform a SPARQL query on Km4City and the triple appear below as in the figure. If you click on the microbutton marked with the arrow, a window is open with some examples.

In the Smart City and IOT world, Real-time data refer in any way at static structural information contextualized on the city map; for example, referring to GPS positions, to civic numbers, to streets, and to locations. Even sensors, may have an initial registration phase in which the location and the metadata are formalized and stored in the knowledge base.

Therefore, when Real-time data are ingested, they have to be linked to their static representation as metadata, classification, sensor kind, sensor producer, position, etc. While the real-time data, time series, are saved into the tabular data store. In this case, Cross link has to be saved into the Data Store towards the Knowledge Base, and into Knowledge base has to be possible to a have a link to the tabular Data Store. Thus, cross links from Developer Dashboard and ServiceMap are established and can be used in browsing and retrieval. At the same time, timeline data are saved into the Data Store, indexed to be easily accessed by filtering per: date/time, kind, geolocation, classification, values, etc. 

The relation among the KB and tabular data is done using the same id (the serviceUri) to identify the entity on the KB and on the table. However, the tabular data is indexed using SOLR to be used from the developer dashboard.

A query on the KB using API or SPARQL can retrieve the serviceUri

For example, the SPARQL query

SELECT ?s { ?s a km4c:Car_park}

can be used retrieve  the list of car parks, for example using link: https://servicemap.disit.org/WebAppGrafo/sparql?query=SELECT%20?s%20{%20?s%20a%20km4c:Car_park}



Once identified the car park, the real-time tabular data can be accessed using SOLR interface, for example using:

https://devdash.snap4city.org/solr/sensori/select?indent=on&q=serviceUri:%22http://www.disit.org/km4city/resource/CarParkS.Lorenzo%22&wt=json

 

On the other side a query made on SOLR to retrieve sensor can identify the serviceUri and from this the data stored on the KB.