SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Semelhante a 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
 

Semelhante a 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
 

Mais de 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
 

Mais de 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
 

Último

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

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