SlideShare a Scribd company logo
ISWC 2013 SSN Workshop

Demo: tablet-based visualisation
of transport data in Madrid using
SPARQLstream
Jean-Paul Calbimonte, Alejandro
Fernández Carrera, Oscar Corcho
22/10/2013

Ontology Engineering Group
Facultad de Informática, Universidad Politécnica de Madrid
jp.calbimonte@upm.es, ocorcho@fi.upm.es
Sensor Networks and the Web

users

Volume
Sensor Networks

Velocity
Variety

WEB
applications

data streams

Universal Web-based access to Sensor data
2
EMT Bus transport in Madrid
• EMT: Public transport company in Madrid

3
Waiting times
• How long do I wait for the next bus?

Only in a few bus
stops
Have to physically
go and watch

EMT wants to be
more WEB friendly
4
EMT Web Services
Bus stops

EMT
Services
https://servicios.emtmadrid.es:8
443/geo/servicegeo.asmx

getStopsLine

getArriveStop

<Stop>
<IdStop>28</IdStop><PMV>61247</PMV>
<Name>P CASTELLANA-JUZGADOS</Name>
<PostalAdress>P de la Castellana, 187</PostalAdress>
<CoordinateX>-3.68972639781606</CoordinateX>
<CoordinateY>40.4650604583015</CoordinateY>
</Stop>

Bus waiting times
<Arrives>
<Arrive>
<IdStop>30</IdStop>
<idLine>5</idLine>
<IsHead>True</IsHead>
<Destination>CHAMARTIN</Destination>
<IdBus>0000</IdBus>
<TimeLeftBus>0</TimeLeftBus>
<DistanceBus>16</DistanceBus>
<PositionXBus>-1</PositionXBus>
<PositionYBus>-1</PositionYBus>
<PositionTypeBus>0</PositionTypeBus>
</Arrive>

Ad-hoc XML model
Identifiers not web-friendly
Not ready for integration w/
other datasets

Working with EMT to define an Open Data strategy
5
data as RDF

W3C SSN Ontology

static data

Extracting data from EMT
Bus stops
<Stop>
<IdStop>28</IdStop><PMV>61247</PMV>
<Name>P CASTELLANA-JUZGADOS</Name>
<PostalAdress>P de la Castellana, 187</PostalAdress>
<CoordinateX>-3.68972639781606</CoordinateX>
<CoordinateY>40.4650604583015</CoordinateY>
</Stop>

EMT
Services
https://servicios.emtmadrid.es:8
443/geo/servicegeo.asmx

users applications

6
Static part (bus stops)
• Currently at:
• http://linkeddata4.dia.fi.upm.es:8080/sparql
• Graph: http://emt.transporte.linkeddata.es/graph/stops

• All bus stops (query)
• select distinct ?x where
{?x a <http://transporte.linkeddata.es/emt#BusStop>}

• URI:
• http://transporte.linkeddata.es/emt/busstop/id/104
• (in the process of defining the URIs)
• Could also be:
http://datos.emtmadrid.es/recurso/BusStop/104 or similar

7
data as RDF

W3C SSN Ontology

static data

Extracting data from EMT
Bus stops
<Stop>
<IdStop>28</IdStop><PMV>61247</PMV>
<Name>P CASTELLANA-JUZGADOS</Name>
<PostalAdress>P de la Castellana, 187</PostalAdress>
<CoordinateX>-3.68972639781606</CoordinateX>
<CoordinateY>40.4650604583015</CoordinateY>
</Stop>

EMT
Services
Streaming data

?

users applications

https://servicios.emtmadrid.es:8
443/geo/servicegeo.asmx

Bus waiting
times

Transform Bus waiting times to RDF Stream?
8
EMT Live data streams

Streaming data

Morphstreams

SPARQLStream queries

users

applications

9

EMT
Services
https://servicios.emtmadrid.es:8
443/geo/servicegeo.asmx

Bus waiting
times
Endpoint available

• We’ll be using this server for the hands-on:

• http://linkeddata2.dia.fi.upm.es:9000
• The instructions of a demo are on the github wiki:
• https://github.com/jpcik/morph-web/wiki/Tutorial:-Morphstreams
• Register queries
• Pull Data
• Push data through websockets
• Simple SPARQLStream endpoint

10
Querying live data streams
• Currently at:
• http://streams.linkeddata.es/emt/sparqlstream

• Example
• SELECT DISTINCT ?timeto ?obs
FROM NAMED STREAM <http://emt.linkeddata.es/data#busstops.srdf>
[NOW - 59 S]
WHERE
{ ?obs a <http://emt.linkeddata.es/data#BusObservation>.
?obs
<http://purl.oclc.org/NET/ssnx/ssn#observedBy><http://transporte.linkedd
ata.es/emt/busstop/id/2018>.
?obs <http://purl.oclc.org/NET/ssnx/ssn#observationResult> ?output.
?output <http://emt.linkeddata.es/data#timeToBusValue> ?av.
?av <http://data.nasa.gov/qudt/owl/qudt#numericValue> ?timeto. }

11
Some commands in Linux
• encoded_value=$(python -c "import urllib; print
urllib.quote('''SELECT DISTINCT ?timeto ?obs FROM
NAMED STREAM
<http://emt.linkeddata.es/data#busstops.srdf>
[NOW - 30 S] WHERE { ?obs a
<http://emt.linkeddata.es/data#BusObservation>.
?obs
<http://purl.oclc.org/NET/ssnx/ssn#observedBy><ht
tp://transporte.linkeddata.es/emt/busstop/id/2018>.
?obs
<http://purl.oclc.org/NET/ssnx/ssn#observationResul
t> ?output. ?output
<http://emt.linkeddata.es/data#timeToBusValue>
?av. ?av
<http://data.nasa.gov/qudt/owl/qudt#numericValue
12
Sample result
{
"head": {
"vars": [ "timeto" , "obs" ]
},
"results": {
"bindings": [
{
"timeto": { "datatype": "http://www.w3.org/2001/XMLSchema#string" ,
"type": "typed-literal" , "value": "0" } ,
"obs": { "type": "uri" , "value":
"http://transporte.linkeddata.es/emt/busstop/id/2018/busline/9/observation/20/09/
2013%2010:28:19%20%2B0200" }
}
]
}
}

13
Configuring Morph-streams
• Main ingredients:
1. Data streams
Link both models

2. Ontology (network)
3. R2RML mappings

14
SSN Ontology with other ontologies

W3C SSN Ontology

tool for modeling our sensor data
combine with domain ontologies
15
R2RML mappings
busObservation a rr:TriplesMap;
rr:logicalTable :emtStream;
rr:subjectMap [
rr:template "http://transporte.linkeddata.es/emt/busstop/id/{stopid}/busline/{lineid}/observation/{timed}";
rr:class emt:BusObservation;
rr:graph emt:busstops.srdf ];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant ssn:observedProperty ];
rr:objectMap [ rr:constant emt:time_to_bus ]];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant ssn:observationResult ];
rr:objectMap [ rr:parentTriplesMap :busOutput; rr:joinCondition "" ]];

busOutput a rr:TriplesMap;
rr:logicalTable :emtStream;
…

16
morph-streams: Ontology-based query rewriting
SELECT ?waittime ?stop
FROM NAMED STREAM
<http://emt.linkeddata.es/data#busstops.srdf> [NOW 300 S]
WHERE {
?obs a emt:BusObservation;
ssn:observedBy ?stop.
ssn:observationResult ?result.
?result emt:timeToBusValue ?av.
?av qudt:numericValue ?waittime.
}

ω 300 second

emt
SELECT timetobus, stopid
FROM emt.win:time(300 second)

Query
rewriting

SPARQLStream

Client

π Timetobus,stopid

Algebra
expression

R2RML
Mappings

[triples/bin
dings]

Esper

Query
Processing

Data
translation

[tuples]

GSN

pull/push

Cosm

Other

SPARQLStream query processing

17
SPARQLStream query
Get Bus waiting times
for a stop URI

SPARQL
endpoint

Map4RDF
iOS

SPARQLStream
endpoint

EMT Map4RDF iOS

SPARQL query

Get Bus stops data
and location

18

Morph-streams
EMT Live
Services
R2RML
Mappings

Waiting
times feed
Map4RDF iOS

19
Conclusions
• A bit of evangelization at EMT
•
•
•
•
•

Use of Web standards for Open Data
Use URIs for identifying stops, bus lines, etc
Use well defined sensor ontologies (SSN)
Use standard geolocation vocabularies
Mix static and streaming dat through URIs

• From the developer point of view
• JSON results easy to consume
• SPARQLstream endpoint through HTTP GET

• The Demo is a very simple but practical example of
how this can be done fairly easily
20

More Related Content

Similar to Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream

Visual c
Visual cVisual c
Visual c
mrshymah
 
Final year project working documentation 2020
Final year project working documentation 2020Final year project working documentation 2020
Final year project working documentation 2020
Vikram Singh
 
Smarter Cities czyli inteligente miasta wg IBM
Smarter Cities czyli inteligente miasta wg IBMSmarter Cities czyli inteligente miasta wg IBM
Smarter Cities czyli inteligente miasta wg IBM
Fundacja Rozwoju Branży Internetowej Netcamp
 
BSTM-MM in VISUM
BSTM-MM in VISUMBSTM-MM in VISUM
BSTM-MM in VISUM
yatayataurparivahan
 
Transport for London - Using Data to Keep London Moving
Transport for London - Using Data to Keep London MovingTransport for London - Using Data to Keep London Moving
Transport for London - Using Data to Keep London Moving
WSO2
 
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdfLaporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
IGedeArieYogantaraSu
 
IRJET- Intelligent Traffic Management System
IRJET- Intelligent Traffic Management SystemIRJET- Intelligent Traffic Management System
IRJET- Intelligent Traffic Management System
IRJET Journal
 
Transport for London: Using data to keep London moving
Transport for London: Using data to keep London movingTransport for London: Using data to keep London moving
Transport for London: Using data to keep London moving
WSO2
 
Accident Avoidance and Privacy-Preserving in V2R Communication using Chord Al...
Accident Avoidance and Privacy-Preserving in V2R Communication using Chord Al...Accident Avoidance and Privacy-Preserving in V2R Communication using Chord Al...
Accident Avoidance and Privacy-Preserving in V2R Communication using Chord Al...
ijceronline
 
Streaming sql w kafka and flink
Streaming sql w  kafka and flinkStreaming sql w  kafka and flink
Streaming sql w kafka and flink
Kenny Gorman
 
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdfCOMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
AkshatTiwari530170
 
FAPESP_Beamer
FAPESP_BeamerFAPESP_Beamer
FAPESP_Beamer
Peter Sels
 
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
confluent
 
Ingesting and Processing IoT Data - using MQTT, Kafka Connect and KSQL
Ingesting and Processing IoT Data - using MQTT, Kafka Connect and KSQLIngesting and Processing IoT Data - using MQTT, Kafka Connect and KSQL
Ingesting and Processing IoT Data - using MQTT, Kafka Connect and KSQL
Guido Schmutz
 
IRJET- Smart Railway System using Trip Chaining Method
IRJET- Smart Railway System using Trip Chaining MethodIRJET- Smart Railway System using Trip Chaining Method
IRJET- Smart Railway System using Trip Chaining Method
IRJET Journal
 
VEHICULAR 2020 Presentation by Kohei Hosono
VEHICULAR 2020 Presentation by Kohei HosonoVEHICULAR 2020 Presentation by Kohei Hosono
VEHICULAR 2020 Presentation by Kohei Hosono
Kohei Hosono
 
water resources
water resourceswater resources
water resources
unliya
 
Ijcet 06 09_004
Ijcet 06 09_004Ijcet 06 09_004
Ijcet 06 09_004
IAEME Publication
 
Smart Transport for benefit of employees, logistics & freight carriers
Smart Transport for benefit of employees, logistics & freight carriersSmart Transport for benefit of employees, logistics & freight carriers
Smart Transport for benefit of employees, logistics & freight carriers
Shubhankar Thakur
 
Railway Reservation System initial django.pptx
Railway Reservation System initial django.pptxRailway Reservation System initial django.pptx
Railway Reservation System initial django.pptx
Nitin846696
 

Similar to Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream (20)

Visual c
Visual cVisual c
Visual c
 
Final year project working documentation 2020
Final year project working documentation 2020Final year project working documentation 2020
Final year project working documentation 2020
 
Smarter Cities czyli inteligente miasta wg IBM
Smarter Cities czyli inteligente miasta wg IBMSmarter Cities czyli inteligente miasta wg IBM
Smarter Cities czyli inteligente miasta wg IBM
 
BSTM-MM in VISUM
BSTM-MM in VISUMBSTM-MM in VISUM
BSTM-MM in VISUM
 
Transport for London - Using Data to Keep London Moving
Transport for London - Using Data to Keep London MovingTransport for London - Using Data to Keep London Moving
Transport for London - Using Data to Keep London Moving
 
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdfLaporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
Laporan Praktikum Keamanan Siber - Tugas 4 -Kelas C - Kelompok 3.pdf
 
IRJET- Intelligent Traffic Management System
IRJET- Intelligent Traffic Management SystemIRJET- Intelligent Traffic Management System
IRJET- Intelligent Traffic Management System
 
Transport for London: Using data to keep London moving
Transport for London: Using data to keep London movingTransport for London: Using data to keep London moving
Transport for London: Using data to keep London moving
 
Accident Avoidance and Privacy-Preserving in V2R Communication using Chord Al...
Accident Avoidance and Privacy-Preserving in V2R Communication using Chord Al...Accident Avoidance and Privacy-Preserving in V2R Communication using Chord Al...
Accident Avoidance and Privacy-Preserving in V2R Communication using Chord Al...
 
Streaming sql w kafka and flink
Streaming sql w  kafka and flinkStreaming sql w  kafka and flink
Streaming sql w kafka and flink
 
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdfCOMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
 
FAPESP_Beamer
FAPESP_BeamerFAPESP_Beamer
FAPESP_Beamer
 
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
Ingesting and Processing IoT Data Using MQTT, Kafka Connect and Kafka Streams...
 
Ingesting and Processing IoT Data - using MQTT, Kafka Connect and KSQL
Ingesting and Processing IoT Data - using MQTT, Kafka Connect and KSQLIngesting and Processing IoT Data - using MQTT, Kafka Connect and KSQL
Ingesting and Processing IoT Data - using MQTT, Kafka Connect and KSQL
 
IRJET- Smart Railway System using Trip Chaining Method
IRJET- Smart Railway System using Trip Chaining MethodIRJET- Smart Railway System using Trip Chaining Method
IRJET- Smart Railway System using Trip Chaining Method
 
VEHICULAR 2020 Presentation by Kohei Hosono
VEHICULAR 2020 Presentation by Kohei HosonoVEHICULAR 2020 Presentation by Kohei Hosono
VEHICULAR 2020 Presentation by Kohei Hosono
 
water resources
water resourceswater resources
water resources
 
Ijcet 06 09_004
Ijcet 06 09_004Ijcet 06 09_004
Ijcet 06 09_004
 
Smart Transport for benefit of employees, logistics & freight carriers
Smart Transport for benefit of employees, logistics & freight carriersSmart Transport for benefit of employees, logistics & freight carriers
Smart Transport for benefit of employees, logistics & freight carriers
 
Railway Reservation System initial django.pptx
Railway Reservation System initial django.pptxRailway Reservation System initial django.pptx
Railway Reservation System initial django.pptx
 

More from PlanetData Network of Excellence

Dl2014 slides
Dl2014 slidesDl2014 slides
A Contextualized Knowledge Repository for Open Data about Trentino
A Contextualized Knowledge Repository for Open Data about TrentinoA Contextualized Knowledge Repository for Open Data about Trentino
A Contextualized Knowledge Repository for Open Data about Trentino
PlanetData Network of Excellence
 
On Leveraging Crowdsourcing Techniques for Schema Matching Networks
On Leveraging Crowdsourcing Techniques for Schema Matching NetworksOn Leveraging Crowdsourcing Techniques for Schema Matching Networks
On Leveraging Crowdsourcing Techniques for Schema Matching Networks
PlanetData Network of Excellence
 
Towards Enabling Probabilistic Databases for Participatory Sensing
Towards Enabling Probabilistic Databases for Participatory SensingTowards Enabling Probabilistic Databases for Participatory Sensing
Towards Enabling Probabilistic Databases for Participatory Sensing
PlanetData Network of Excellence
 
Privacy-Preserving Schema Reuse
Privacy-Preserving Schema ReusePrivacy-Preserving Schema Reuse
Privacy-Preserving Schema Reuse
PlanetData Network of Excellence
 
Pay-as-you-go Reconciliation in Schema Matching Networks
Pay-as-you-go Reconciliation in Schema Matching NetworksPay-as-you-go Reconciliation in Schema Matching Networks
Pay-as-you-go Reconciliation in Schema Matching Networks
PlanetData Network of Excellence
 
On the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream ProcessingOn the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream Processing
PlanetData Network of Excellence
 
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
PlanetData Network of Excellence
 
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatch
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatchLinking Smart Cities Datasets with Human Computation: the case of UrbanMatch
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatch
PlanetData Network of Excellence
 
SciQL, Bridging the Gap between Science and Relational DBMS
SciQL, Bridging the Gap between Science and Relational DBMSSciQL, Bridging the Gap between Science and Relational DBMS
SciQL, Bridging the Gap between Science and Relational DBMS
PlanetData Network of Excellence
 
CLODA: A Crowdsourced Linked Open Data Architecture
CLODA: A Crowdsourced Linked Open Data ArchitectureCLODA: A Crowdsourced Linked Open Data Architecture
CLODA: A Crowdsourced Linked Open Data Architecture
PlanetData Network of Excellence
 
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduce
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduceScalable Nonmonotonic Reasoning over RDF Data Using MapReduce
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduce
PlanetData Network of Excellence
 
Data and Knowledge Evolution
Data and Knowledge Evolution  Data and Knowledge Evolution
Data and Knowledge Evolution
PlanetData Network of Excellence
 
Evolution of Workflow Provenance Information in the Presence of Custom Infere...
Evolution of Workflow Provenance Information in the Presence of Custom Infere...Evolution of Workflow Provenance Information in the Presence of Custom Infere...
Evolution of Workflow Provenance Information in the Presence of Custom Infere...
PlanetData Network of Excellence
 
Access Control for RDF graphs using Abstract Models
Access Control for RDF graphs using Abstract ModelsAccess Control for RDF graphs using Abstract Models
Access Control for RDF graphs using Abstract Models
PlanetData Network of Excellence
 
Arrays in Databases, the next frontier?
Arrays in Databases, the next frontier?Arrays in Databases, the next frontier?
Arrays in Databases, the next frontier?
PlanetData Network of Excellence
 
Abstract Access Control Model for Dynamic RDF Datasets
Abstract Access Control Model for Dynamic RDF DatasetsAbstract Access Control Model for Dynamic RDF Datasets
Abstract Access Control Model for Dynamic RDF Datasets
PlanetData Network of Excellence
 
Towards Parallel Nonmonotonic Reasoning with Billions of Facts
Towards Parallel Nonmonotonic Reasoning with Billions of FactsTowards Parallel Nonmonotonic Reasoning with Billions of Facts
Towards Parallel Nonmonotonic Reasoning with Billions of Facts
PlanetData Network of Excellence
 
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
PlanetData Network of Excellence
 
Heuristic based Query Optimisation for SPARQL
Heuristic based Query Optimisation for SPARQLHeuristic based Query Optimisation for SPARQL
Heuristic based Query Optimisation for SPARQL
PlanetData Network of Excellence
 

More from PlanetData Network of Excellence (20)

Dl2014 slides
Dl2014 slidesDl2014 slides
Dl2014 slides
 
A Contextualized Knowledge Repository for Open Data about Trentino
A Contextualized Knowledge Repository for Open Data about TrentinoA Contextualized Knowledge Repository for Open Data about Trentino
A Contextualized Knowledge Repository for Open Data about Trentino
 
On Leveraging Crowdsourcing Techniques for Schema Matching Networks
On Leveraging Crowdsourcing Techniques for Schema Matching NetworksOn Leveraging Crowdsourcing Techniques for Schema Matching Networks
On Leveraging Crowdsourcing Techniques for Schema Matching Networks
 
Towards Enabling Probabilistic Databases for Participatory Sensing
Towards Enabling Probabilistic Databases for Participatory SensingTowards Enabling Probabilistic Databases for Participatory Sensing
Towards Enabling Probabilistic Databases for Participatory Sensing
 
Privacy-Preserving Schema Reuse
Privacy-Preserving Schema ReusePrivacy-Preserving Schema Reuse
Privacy-Preserving Schema Reuse
 
Pay-as-you-go Reconciliation in Schema Matching Networks
Pay-as-you-go Reconciliation in Schema Matching NetworksPay-as-you-go Reconciliation in Schema Matching Networks
Pay-as-you-go Reconciliation in Schema Matching Networks
 
On the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream ProcessingOn the need for a W3C community group on RDF Stream Processing
On the need for a W3C community group on RDF Stream Processing
 
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
Urbanopoly: Collection and Quality Assessment of Geo-spatial Linked Data via ...
 
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatch
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatchLinking Smart Cities Datasets with Human Computation: the case of UrbanMatch
Linking Smart Cities Datasets with Human Computation: the case of UrbanMatch
 
SciQL, Bridging the Gap between Science and Relational DBMS
SciQL, Bridging the Gap between Science and Relational DBMSSciQL, Bridging the Gap between Science and Relational DBMS
SciQL, Bridging the Gap between Science and Relational DBMS
 
CLODA: A Crowdsourced Linked Open Data Architecture
CLODA: A Crowdsourced Linked Open Data ArchitectureCLODA: A Crowdsourced Linked Open Data Architecture
CLODA: A Crowdsourced Linked Open Data Architecture
 
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduce
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduceScalable Nonmonotonic Reasoning over RDF Data Using MapReduce
Scalable Nonmonotonic Reasoning over RDF Data Using MapReduce
 
Data and Knowledge Evolution
Data and Knowledge Evolution  Data and Knowledge Evolution
Data and Knowledge Evolution
 
Evolution of Workflow Provenance Information in the Presence of Custom Infere...
Evolution of Workflow Provenance Information in the Presence of Custom Infere...Evolution of Workflow Provenance Information in the Presence of Custom Infere...
Evolution of Workflow Provenance Information in the Presence of Custom Infere...
 
Access Control for RDF graphs using Abstract Models
Access Control for RDF graphs using Abstract ModelsAccess Control for RDF graphs using Abstract Models
Access Control for RDF graphs using Abstract Models
 
Arrays in Databases, the next frontier?
Arrays in Databases, the next frontier?Arrays in Databases, the next frontier?
Arrays in Databases, the next frontier?
 
Abstract Access Control Model for Dynamic RDF Datasets
Abstract Access Control Model for Dynamic RDF DatasetsAbstract Access Control Model for Dynamic RDF Datasets
Abstract Access Control Model for Dynamic RDF Datasets
 
Towards Parallel Nonmonotonic Reasoning with Billions of Facts
Towards Parallel Nonmonotonic Reasoning with Billions of FactsTowards Parallel Nonmonotonic Reasoning with Billions of Facts
Towards Parallel Nonmonotonic Reasoning with Billions of Facts
 
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
Automation in Cytomics: A Modern RDBMS Based Platform for Image Analysis and ...
 
Heuristic based Query Optimisation for SPARQL
Heuristic based Query Optimisation for SPARQLHeuristic based Query Optimisation for SPARQL
Heuristic based Query Optimisation for SPARQL
 

Recently uploaded

Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 

Recently uploaded (20)

Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 

Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream

  • 1. ISWC 2013 SSN Workshop Demo: tablet-based visualisation of transport data in Madrid using SPARQLstream Jean-Paul Calbimonte, Alejandro Fernández Carrera, Oscar Corcho 22/10/2013 Ontology Engineering Group Facultad de Informática, Universidad Politécnica de Madrid jp.calbimonte@upm.es, ocorcho@fi.upm.es
  • 2. Sensor Networks and the Web users Volume Sensor Networks Velocity Variety WEB applications data streams Universal Web-based access to Sensor data 2
  • 3. EMT Bus transport in Madrid • EMT: Public transport company in Madrid 3
  • 4. Waiting times • How long do I wait for the next bus? Only in a few bus stops Have to physically go and watch EMT wants to be more WEB friendly 4
  • 5. EMT Web Services Bus stops EMT Services https://servicios.emtmadrid.es:8 443/geo/servicegeo.asmx getStopsLine getArriveStop <Stop> <IdStop>28</IdStop><PMV>61247</PMV> <Name>P CASTELLANA-JUZGADOS</Name> <PostalAdress>P de la Castellana, 187</PostalAdress> <CoordinateX>-3.68972639781606</CoordinateX> <CoordinateY>40.4650604583015</CoordinateY> </Stop> Bus waiting times <Arrives> <Arrive> <IdStop>30</IdStop> <idLine>5</idLine> <IsHead>True</IsHead> <Destination>CHAMARTIN</Destination> <IdBus>0000</IdBus> <TimeLeftBus>0</TimeLeftBus> <DistanceBus>16</DistanceBus> <PositionXBus>-1</PositionXBus> <PositionYBus>-1</PositionYBus> <PositionTypeBus>0</PositionTypeBus> </Arrive> Ad-hoc XML model Identifiers not web-friendly Not ready for integration w/ other datasets Working with EMT to define an Open Data strategy 5
  • 6. data as RDF W3C SSN Ontology static data Extracting data from EMT Bus stops <Stop> <IdStop>28</IdStop><PMV>61247</PMV> <Name>P CASTELLANA-JUZGADOS</Name> <PostalAdress>P de la Castellana, 187</PostalAdress> <CoordinateX>-3.68972639781606</CoordinateX> <CoordinateY>40.4650604583015</CoordinateY> </Stop> EMT Services https://servicios.emtmadrid.es:8 443/geo/servicegeo.asmx users applications 6
  • 7. Static part (bus stops) • Currently at: • http://linkeddata4.dia.fi.upm.es:8080/sparql • Graph: http://emt.transporte.linkeddata.es/graph/stops • All bus stops (query) • select distinct ?x where {?x a <http://transporte.linkeddata.es/emt#BusStop>} • URI: • http://transporte.linkeddata.es/emt/busstop/id/104 • (in the process of defining the URIs) • Could also be: http://datos.emtmadrid.es/recurso/BusStop/104 or similar 7
  • 8. data as RDF W3C SSN Ontology static data Extracting data from EMT Bus stops <Stop> <IdStop>28</IdStop><PMV>61247</PMV> <Name>P CASTELLANA-JUZGADOS</Name> <PostalAdress>P de la Castellana, 187</PostalAdress> <CoordinateX>-3.68972639781606</CoordinateX> <CoordinateY>40.4650604583015</CoordinateY> </Stop> EMT Services Streaming data ? users applications https://servicios.emtmadrid.es:8 443/geo/servicegeo.asmx Bus waiting times Transform Bus waiting times to RDF Stream? 8
  • 9. EMT Live data streams Streaming data Morphstreams SPARQLStream queries users applications 9 EMT Services https://servicios.emtmadrid.es:8 443/geo/servicegeo.asmx Bus waiting times
  • 10. Endpoint available • We’ll be using this server for the hands-on: • http://linkeddata2.dia.fi.upm.es:9000 • The instructions of a demo are on the github wiki: • https://github.com/jpcik/morph-web/wiki/Tutorial:-Morphstreams • Register queries • Pull Data • Push data through websockets • Simple SPARQLStream endpoint 10
  • 11. Querying live data streams • Currently at: • http://streams.linkeddata.es/emt/sparqlstream • Example • SELECT DISTINCT ?timeto ?obs FROM NAMED STREAM <http://emt.linkeddata.es/data#busstops.srdf> [NOW - 59 S] WHERE { ?obs a <http://emt.linkeddata.es/data#BusObservation>. ?obs <http://purl.oclc.org/NET/ssnx/ssn#observedBy><http://transporte.linkedd ata.es/emt/busstop/id/2018>. ?obs <http://purl.oclc.org/NET/ssnx/ssn#observationResult> ?output. ?output <http://emt.linkeddata.es/data#timeToBusValue> ?av. ?av <http://data.nasa.gov/qudt/owl/qudt#numericValue> ?timeto. } 11
  • 12. Some commands in Linux • encoded_value=$(python -c "import urllib; print urllib.quote('''SELECT DISTINCT ?timeto ?obs FROM NAMED STREAM <http://emt.linkeddata.es/data#busstops.srdf> [NOW - 30 S] WHERE { ?obs a <http://emt.linkeddata.es/data#BusObservation>. ?obs <http://purl.oclc.org/NET/ssnx/ssn#observedBy><ht tp://transporte.linkeddata.es/emt/busstop/id/2018>. ?obs <http://purl.oclc.org/NET/ssnx/ssn#observationResul t> ?output. ?output <http://emt.linkeddata.es/data#timeToBusValue> ?av. ?av <http://data.nasa.gov/qudt/owl/qudt#numericValue 12
  • 13. Sample result { "head": { "vars": [ "timeto" , "obs" ] }, "results": { "bindings": [ { "timeto": { "datatype": "http://www.w3.org/2001/XMLSchema#string" , "type": "typed-literal" , "value": "0" } , "obs": { "type": "uri" , "value": "http://transporte.linkeddata.es/emt/busstop/id/2018/busline/9/observation/20/09/ 2013%2010:28:19%20%2B0200" } } ] } } 13
  • 14. Configuring Morph-streams • Main ingredients: 1. Data streams Link both models 2. Ontology (network) 3. R2RML mappings 14
  • 15. SSN Ontology with other ontologies W3C SSN Ontology tool for modeling our sensor data combine with domain ontologies 15
  • 16. R2RML mappings busObservation a rr:TriplesMap; rr:logicalTable :emtStream; rr:subjectMap [ rr:template "http://transporte.linkeddata.es/emt/busstop/id/{stopid}/busline/{lineid}/observation/{timed}"; rr:class emt:BusObservation; rr:graph emt:busstops.srdf ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ssn:observedProperty ]; rr:objectMap [ rr:constant emt:time_to_bus ]]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ssn:observationResult ]; rr:objectMap [ rr:parentTriplesMap :busOutput; rr:joinCondition "" ]]; busOutput a rr:TriplesMap; rr:logicalTable :emtStream; … 16
  • 17. morph-streams: Ontology-based query rewriting SELECT ?waittime ?stop FROM NAMED STREAM <http://emt.linkeddata.es/data#busstops.srdf> [NOW 300 S] WHERE { ?obs a emt:BusObservation; ssn:observedBy ?stop. ssn:observationResult ?result. ?result emt:timeToBusValue ?av. ?av qudt:numericValue ?waittime. } ω 300 second emt SELECT timetobus, stopid FROM emt.win:time(300 second) Query rewriting SPARQLStream Client π Timetobus,stopid Algebra expression R2RML Mappings [triples/bin dings] Esper Query Processing Data translation [tuples] GSN pull/push Cosm Other SPARQLStream query processing 17
  • 18. SPARQLStream query Get Bus waiting times for a stop URI SPARQL endpoint Map4RDF iOS SPARQLStream endpoint EMT Map4RDF iOS SPARQL query Get Bus stops data and location 18 Morph-streams EMT Live Services R2RML Mappings Waiting times feed
  • 20. Conclusions • A bit of evangelization at EMT • • • • • Use of Web standards for Open Data Use URIs for identifying stops, bus lines, etc Use well defined sensor ontologies (SSN) Use standard geolocation vocabularies Mix static and streaming dat through URIs • From the developer point of view • JSON results easy to consume • SPARQLstream endpoint through HTTP GET • The Demo is a very simple but practical example of how this can be done fairly easily 20