SlideShare a Scribd company logo
1 of 20
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 SSN2013 Demo: tablet based visualization of transport data with SPARQLStream

Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit
 
Transport-as-a-Service (TaaS) - How we build next generation plug-and-play IT...
Transport-as-a-Service (TaaS) - How we build next generation plug-and-play IT...Transport-as-a-Service (TaaS) - How we build next generation plug-and-play IT...
Transport-as-a-Service (TaaS) - How we build next generation plug-and-play IT...Christoffer Vig
 
Masterslides Trafiklabmeetup 6 dec
Masterslides Trafiklabmeetup 6 decMasterslides Trafiklabmeetup 6 dec
Masterslides Trafiklabmeetup 6 decEmma Skille
 
Final year project working documentation 2020
Final year project working documentation 2020Final year project working documentation 2020
Final year project working documentation 2020Vikram Singh
 
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 MovingWSO2
 
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.pdfIGedeArieYogantaraSu
 
IRJET- Intelligent Traffic Management System
IRJET- Intelligent Traffic Management SystemIRJET- Intelligent Traffic Management System
IRJET- Intelligent Traffic Management SystemIRJET 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 movingWSO2
 
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 flinkKenny 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.pdfAkshatTiwari530170
 
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 KSQLGuido 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 MethodIRJET Journal
 
VEHICULAR 2020 Presentation by Kohei Hosono
VEHICULAR 2020 Presentation by Kohei HosonoVEHICULAR 2020 Presentation by Kohei Hosono
VEHICULAR 2020 Presentation by Kohei HosonoKohei Hosono
 
water resources
water resourceswater resources
water resourcesunliya
 

Similar to SSN2013 Demo: tablet based visualization of transport data with SPARQLStream (20)

Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
 
Transport-as-a-Service (TaaS) - How we build next generation plug-and-play IT...
Transport-as-a-Service (TaaS) - How we build next generation plug-and-play IT...Transport-as-a-Service (TaaS) - How we build next generation plug-and-play IT...
Transport-as-a-Service (TaaS) - How we build next generation plug-and-play IT...
 
Masterslides Trafiklabmeetup 6 dec
Masterslides Trafiklabmeetup 6 decMasterslides Trafiklabmeetup 6 dec
Masterslides Trafiklabmeetup 6 dec
 
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
 

More from Jean-Paul Calbimonte

Towards Collaborative Creativity in Persuasive Multi-agent Systems
Towards Collaborative Creativity in Persuasive Multi-agent SystemsTowards Collaborative Creativity in Persuasive Multi-agent Systems
Towards Collaborative Creativity in Persuasive Multi-agent SystemsJean-Paul Calbimonte
 
A Platform for Difficulty Assessment and Recommendation of Hiking Trails
A Platform for Difficulty Assessment andRecommendation of Hiking TrailsA Platform for Difficulty Assessment andRecommendation of Hiking Trails
A Platform for Difficulty Assessment and Recommendation of Hiking TrailsJean-Paul Calbimonte
 
Decentralized Management of Patient Profiles and Trajectories through Semanti...
Decentralized Management of Patient Profiles and Trajectories through Semanti...Decentralized Management of Patient Profiles and Trajectories through Semanti...
Decentralized Management of Patient Profiles and Trajectories through Semanti...Jean-Paul Calbimonte
 
Personal Data Privacy Semantics in Multi-Agent Systems Interactions
Personal Data Privacy Semantics in Multi-Agent Systems InteractionsPersonal Data Privacy Semantics in Multi-Agent Systems Interactions
Personal Data Privacy Semantics in Multi-Agent Systems InteractionsJean-Paul Calbimonte
 
SanTour: Personalized Recommendation of Hiking Trails to Health Pro files
SanTour: Personalized Recommendation of Hiking Trails to Health ProfilesSanTour: Personalized Recommendation of Hiking Trails to Health Profiles
SanTour: Personalized Recommendation of Hiking Trails to Health Pro filesJean-Paul Calbimonte
 
Multi-agent interactions on the Web through Linked Data Notifications
Multi-agent interactions on the Web through Linked Data NotificationsMulti-agent interactions on the Web through Linked Data Notifications
Multi-agent interactions on the Web through Linked Data NotificationsJean-Paul Calbimonte
 
The MedRed Ontology for Representing Clinical Data Acquisition Metadata
The MedRed Ontology for Representing Clinical Data Acquisition MetadataThe MedRed Ontology for Representing Clinical Data Acquisition Metadata
The MedRed Ontology for Representing Clinical Data Acquisition MetadataJean-Paul Calbimonte
 
Linked Data Notifications for RDF Streams
Linked Data Notifications for RDF StreamsLinked Data Notifications for RDF Streams
Linked Data Notifications for RDF StreamsJean-Paul Calbimonte
 
Fundamentos de Scala (Scala Basics) (español) Catecbol
Fundamentos de Scala (Scala Basics) (español) CatecbolFundamentos de Scala (Scala Basics) (español) Catecbol
Fundamentos de Scala (Scala Basics) (español) CatecbolJean-Paul Calbimonte
 
Connecting Stream Reasoners on the Web
Connecting Stream Reasoners on the WebConnecting Stream Reasoners on the Web
Connecting Stream Reasoners on the WebJean-Paul Calbimonte
 
RDF Stream Processing Tutorial: RSP implementations
RDF Stream Processing Tutorial: RSP implementationsRDF Stream Processing Tutorial: RSP implementations
RDF Stream Processing Tutorial: RSP implementationsJean-Paul Calbimonte
 
Query Rewriting in RDF Stream Processing
Query Rewriting in RDF Stream ProcessingQuery Rewriting in RDF Stream Processing
Query Rewriting in RDF Stream ProcessingJean-Paul Calbimonte
 
Toward Semantic Sensor Data Archives on the Web
Toward Semantic Sensor Data Archives on the WebToward Semantic Sensor Data Archives on the Web
Toward Semantic Sensor Data Archives on the WebJean-Paul Calbimonte
 
Detection of hypoglycemic events through wearable sensors
Detection of hypoglycemic events through wearable sensorsDetection of hypoglycemic events through wearable sensors
Detection of hypoglycemic events through wearable sensorsJean-Paul Calbimonte
 
RDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of SemanticsRDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of SemanticsJean-Paul Calbimonte
 
The Schema Editor of OpenIoT for Semantic Sensor Networks
The Schema Editor of OpenIoT for Semantic Sensor NetworksThe Schema Editor of OpenIoT for Semantic Sensor Networks
The Schema Editor of OpenIoT for Semantic Sensor NetworksJean-Paul Calbimonte
 
Scala Programming for Semantic Web Developers ESWC Semdev2015
Scala Programming for Semantic Web Developers ESWC Semdev2015Scala Programming for Semantic Web Developers ESWC Semdev2015
Scala Programming for Semantic Web Developers ESWC Semdev2015Jean-Paul Calbimonte
 

More from Jean-Paul Calbimonte (20)

Towards Collaborative Creativity in Persuasive Multi-agent Systems
Towards Collaborative Creativity in Persuasive Multi-agent SystemsTowards Collaborative Creativity in Persuasive Multi-agent Systems
Towards Collaborative Creativity in Persuasive Multi-agent Systems
 
A Platform for Difficulty Assessment and Recommendation of Hiking Trails
A Platform for Difficulty Assessment andRecommendation of Hiking TrailsA Platform for Difficulty Assessment andRecommendation of Hiking Trails
A Platform for Difficulty Assessment and Recommendation of Hiking Trails
 
Stream reasoning agents
Stream reasoning agentsStream reasoning agents
Stream reasoning agents
 
Decentralized Management of Patient Profiles and Trajectories through Semanti...
Decentralized Management of Patient Profiles and Trajectories through Semanti...Decentralized Management of Patient Profiles and Trajectories through Semanti...
Decentralized Management of Patient Profiles and Trajectories through Semanti...
 
Personal Data Privacy Semantics in Multi-Agent Systems Interactions
Personal Data Privacy Semantics in Multi-Agent Systems InteractionsPersonal Data Privacy Semantics in Multi-Agent Systems Interactions
Personal Data Privacy Semantics in Multi-Agent Systems Interactions
 
RDF data validation 2017 SHACL
RDF data validation 2017 SHACLRDF data validation 2017 SHACL
RDF data validation 2017 SHACL
 
SanTour: Personalized Recommendation of Hiking Trails to Health Pro files
SanTour: Personalized Recommendation of Hiking Trails to Health ProfilesSanTour: Personalized Recommendation of Hiking Trails to Health Profiles
SanTour: Personalized Recommendation of Hiking Trails to Health Pro files
 
Multi-agent interactions on the Web through Linked Data Notifications
Multi-agent interactions on the Web through Linked Data NotificationsMulti-agent interactions on the Web through Linked Data Notifications
Multi-agent interactions on the Web through Linked Data Notifications
 
The MedRed Ontology for Representing Clinical Data Acquisition Metadata
The MedRed Ontology for Representing Clinical Data Acquisition MetadataThe MedRed Ontology for Representing Clinical Data Acquisition Metadata
The MedRed Ontology for Representing Clinical Data Acquisition Metadata
 
Linked Data Notifications for RDF Streams
Linked Data Notifications for RDF StreamsLinked Data Notifications for RDF Streams
Linked Data Notifications for RDF Streams
 
Fundamentos de Scala (Scala Basics) (español) Catecbol
Fundamentos de Scala (Scala Basics) (español) CatecbolFundamentos de Scala (Scala Basics) (español) Catecbol
Fundamentos de Scala (Scala Basics) (español) Catecbol
 
Connecting Stream Reasoners on the Web
Connecting Stream Reasoners on the WebConnecting Stream Reasoners on the Web
Connecting Stream Reasoners on the Web
 
RDF Stream Processing Tutorial: RSP implementations
RDF Stream Processing Tutorial: RSP implementationsRDF Stream Processing Tutorial: RSP implementations
RDF Stream Processing Tutorial: RSP implementations
 
Query Rewriting in RDF Stream Processing
Query Rewriting in RDF Stream ProcessingQuery Rewriting in RDF Stream Processing
Query Rewriting in RDF Stream Processing
 
Toward Semantic Sensor Data Archives on the Web
Toward Semantic Sensor Data Archives on the WebToward Semantic Sensor Data Archives on the Web
Toward Semantic Sensor Data Archives on the Web
 
Detection of hypoglycemic events through wearable sensors
Detection of hypoglycemic events through wearable sensorsDetection of hypoglycemic events through wearable sensors
Detection of hypoglycemic events through wearable sensors
 
RDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of SemanticsRDF Stream Processing and the role of Semantics
RDF Stream Processing and the role of Semantics
 
The Schema Editor of OpenIoT for Semantic Sensor Networks
The Schema Editor of OpenIoT for Semantic Sensor NetworksThe Schema Editor of OpenIoT for Semantic Sensor Networks
The Schema Editor of OpenIoT for Semantic Sensor Networks
 
Scala Programming for Semantic Web Developers ESWC Semdev2015
Scala Programming for Semantic Web Developers ESWC Semdev2015Scala Programming for Semantic Web Developers ESWC Semdev2015
Scala Programming for Semantic Web Developers ESWC Semdev2015
 
Streams of RDF Events Derive2015
Streams of RDF Events Derive2015Streams of RDF Events Derive2015
Streams of RDF Events Derive2015
 

Recently uploaded

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

SSN2013 Demo: tablet based visualization of transport data with 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