<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Short Paper: From Streaming Data to Linked Data - A Case Study with Bike Sharing Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Edna Ruckhaus</string-name>
          <email>ruckhaus@ldc.usb.ve</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jean-Paul Calbimonte</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rau´ l Garc´ıa-Castro</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oscar Corcho</string-name>
          <email>ocorchog@fi.upm.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ontology Engineering Group, Universidad Polite ́cnica de Madrid</institution>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universidad Simo ́ n Bol ́ıvar</institution>
          ,
          <country country="VE">Venezuela</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Current methods and tools that support Linked Data publication have mainly focused so far on static data, without considering the growing amount of streaming data available on the Web. In this paper we describe a case study that involves the publication of static and streaming Linked Data for bike sharing systems and related entities. We describe some of the challenges that we have faced, the solutions that we have explored, the lessons that we have learned, and the opportunities that lie in the future for exploiting Linked Stream Data.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The process of publication of a dataset as Linked Data is composed of several activities:
specification, modeling, generation, publication, and exploitation [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Current methods
and tools that support Linked Data publication have been designed for static data
without considering the growing amount of streaming data available on the Web.
Nevertheless, streaming data is being used in a large number of domains (financial, environment,
transport, energy, among others), and may be generated by physical sensors, by software
systems or even by humans.
      </p>
      <p>The representation of streaming data following the principles of Linked Data
facilitates its integration to the diverse datasets in the Linked Data cloud, and also to other
private Linked Data datasets. Streaming data usually coexists with static data, either
because there is static data associated with the sensors that produce data streams, usually
in the form of descriptive information on the sensor platform and observations (e.g.,
platform name, location, observed property), or because there are links to static data
published in another dataset. Additionally, user requirements may be related to
statistics on streaming data that have been accumulated over time, so historical streaming
data needs to be considered in the di erent steps of linked stream data publication.</p>
      <p>In this paper we report on our experience on exposing as Linked Data some static
and dynamic data available in the Spanish cities of Leo´ n and Zaragoza. More
specifically, we have focused on static data about points of interest, available from Government
open data portals, and on dynamic data about bicycle sharing systems.</p>
    </sec>
    <sec id="sec-2">
      <title>Case Study: Bicycle Sharing Systems</title>
      <p>Several bicycle sharing systems in cities all over the world have made their data
available on the Web. Bike rental stations are distributed in di erent points in the city and
the bike sharing systemusually allows users to pick up a bike at any station and drop it
o at any (other) station. The goal of this case study is to publish and exploit up-to-date
Linked Data about the availability of bikes and free slots in the stations, and links to
related resources like travel guides and points of interest (e.g., museums, restaurants).</p>
      <p>
        At this first stage, we are using the data rendered by the services provided by the
CityBikes API1, focusing on the bike sharing systems from the Spanish cities of Leo´n
and Zaragoza. Besides, we have connected this streaming data to static data from open
data portals from these cities, on museums and libraries (for Leo´n), and on restaurants
(for Zaragoza), and to data about travel guides from El Viajero [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Data Publication Activities</title>
      <p>
        In this case study, we followed a process inspired by the method proposed in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], which
envisions a continuous process that consists of five main activities: specification,
modelling, generation, publication and exploitation.
3.1
      </p>
      <sec id="sec-3-1">
        <title>Specification</title>
        <p>The data sources selected for this case study were related to resources that could be
useful to locals and visitors that use bike sharing systems in the di erent cities.</p>
        <p>The data for bike sharing systems were obtained in JSON through the CityBikes
API. Data for restaurants, museums, libraries and guides is published in RDF by open
data portals from the cities of Leo´n and Zaragoza2. While data from Zaragoza was
generally of high quality, we found some problems with data from Leo´n, namely: invalid
URIs, points of interest that were either not geo-located or with a geo-position but no
location name, di erent coordinate systems for geographic positions, and timestamps
that did not represent the timezone where they were located. After some interactions,
these problems were corrected by the data providers themselves; this shows that data
reuse can help in the curation of data sources. In the case of the di erent coordinate
systems, the inconsistency was solved during the RDF generation step.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Modelling</title>
        <p>We have built the citybikes ontology network3 to represent knowledge related to
available bikes and free slots in bike sharing systems. These measurements represent the
state of a bike station in a particular place and time and are measured through a sensor
in each station. The citybikes ontology network follows a modular structure consisting</p>
        <sec id="sec-3-2-1">
          <title>1 http://api.citybik.es/</title>
          <p>2 http://www.datosabiertos.jcyl.es/, http://www.zaragoza.es/ciudad/risp/
3 http://transporte.linkeddata.es/files/citybikesontologynetwork.zip</p>
          <p>Identifiers
dcterms
id</p>
          <p>Observatins
avaiable bikes</p>
          <p>free slots
Geopositions
wgs84_pos
latitude and
longitude</p>
          <p>Geonames
geonames</p>
          <p>Bike
Systems</p>
          <p>bicy
located
date and
time
Timestamps</p>
          <p>Time
ssn
values
Quantities</p>
          <p>qudt
of a central ontology that is related to a set of ontologies that describe the di erent
sub-domains involved in the modelling of the bike station measurements (Figure 1).</p>
          <p>The central ontology is the bike sharing system ontology, which contains concepts
such as the bike system and its name, the station and its name, number, internal id,
status, description, number of boxes, free slots and free bikes. We reuse the following
ontologies: Semantic Sensor Network4 for sensors and observations, Geonames5 to
define the location of the systems and the stations based on their latitude and longitude,
W3C time ontology6 to represent the timestamp as an instant, Dublin Core7 for
identifiers, WGS 848 for geo positioning bike sharing systems and stations with latitude and
longitude, and QUDT9 for the number of available bikes and free slots.</p>
          <p>Once the ontology was developed, we defined a resource naming strategy to ensure
that every class in the ontology can have individuals with unique identifiers (i.e., URIs).
For this, it was necessary to identify the cardinalities of the properties in the ontology,
since information on the “conceptual schema” of the data sources was not explicit.
3.3</p>
        </sec>
      </sec>
      <sec id="sec-3-3">
        <title>RDF Data Generation and Publication</title>
        <p>In our use case and in sensor applications in general, we require publishing and
consuming stored and streaming data. The first type, also referred to as static, is often related
to the metadata and contextual information about sensor data, including geographical
location, sensor and station characteristics, observed features, and also includes data</p>
        <sec id="sec-3-3-1">
          <title>4 http://purl.oclc.org/NET/ssnx/ssn#</title>
          <p>5 http://www.geonames.org/ontology#
6 http://www.w3.org/2006/time#
7 http://purl.org/dc/terms/
8 http://www.w3.org/2003/01/geo/wgs84_pos
9 http://qudt.org/</p>
          <p>SPARQL</p>
          <p>RDF</p>
          <p>Store
SPARQL-Stream</p>
          <p>RDF
Generation
ODEMapster
R2RML</p>
          <p>Mappings
SPARQL-Stream</p>
          <p>Processor</p>
          <p>Query
Rewriting
Results
Delivery</p>
          <p>Static Data
Dynamic Data
c
it
y
b
i.
k
e
s
Stream Query</p>
          <p>Processing
GSN
about points of interest (museums, libraries, etc.). Streaming data, in contrast, are highly
dynamic and are centered on the observations of free slots and available bikes.</p>
          <p>For static data, there are methods and tools for generating RDF and publishing them
as Linked Data. Some of these tools generate the RDF data using declarative mappings
such as R2RML10 from relational databases, in bulk load operations. This approach is
e ective for static data, as it is seldom updated. However, for the dynamic sensor
observations and for performing continuous queries, this is not the case. The available tools
are unsuitable for materializing data in real time, and even if they were, the SPARQL
query language does not consider streaming data operators such as time windows.</p>
          <p>
            Therefore, we used a di erent approach (see Figure 2), based on the idea of reusing
streaming sensor data processing engines, that are able to process highly dynamic data
e ciently, and using temporal constructs. In order to use such engines, we rely on
ontology-based query rewriting of SPARQL queries with streaming extensions. We
used one such extension, SPARQLStream [
            <xref ref-type="bibr" rid="ref3">3</xref>
            ], that is able to use Data Stream
Management Systems (DSMS), Complex Event Processors (CEP) and Sensor middleware as
underlying query processors. In particular, we used GSN [
            <xref ref-type="bibr" rid="ref4">4</xref>
            ] (Global Sensor Networks),
a widely used sensor data processor to which we added a wrapper to the CityBikes
API. One of the advantages of using SPARQLStream is that it uses R2RML mappings
to rewrite queries into expressions that can be instantiated and executed by streaming
query engines [
            <xref ref-type="bibr" rid="ref5">5</xref>
            ]. This allowed us to use the same set of mapping definitions for both
static and streaming data. We used ODEMapster11 for static data and SPARQLStream
for dynamic data. Notice that both approaches follow very di erent RDF management
strategies: for static data we generate materialized RDF triples that can be later queried
in a standard triple store; for dynamic data we pose queries to a virtual streaming RDF
dataset, and the queries are rewritten by a SPARQLStream processor to the underlying
stream processing engine, which throws the query results.
          </p>
          <p>When defining the R2RML mappings it was sometimes necessary to define an
object map that has a join condition specifying a child and a parent triples map. As the
10 W3C RDB2RDF Mapping Language: http://www.w3.org/TR/r2rml/
11 ODEMapster RDB2RDF Tool: http://neon-toolkit.org/wiki/ODEMapster
generated RDF property flows from child to parent, it was sometimes necessary to
define an inverse property in the ontology only for this purpose. This is the case of the
property isStationOf which is the inverse of the property hasStation.</p>
          <p>An interesting requirement in our use case is the possibility of accessing historical
data from the dynamic observations. In order to perform data analysis or compare live
data with historical records, we cannot directly use the SPARQLStream approach as it
stands, because it only considers recent observation values. As an alternative, we chose
to use the live SPARQLStream service in order to periodically pose CONSTRUCT queries
that generate RDF triples, which can be later imported to the static RDF store. Then,
users requiring statistical or analysis queries, can directly use such a store.</p>
          <p>
            The linking activity was completed with the Silk platform [
            <xref ref-type="bibr" rid="ref6">6</xref>
            ]. The activity consisted
in geo-linking the stations with the points of interest and the travel guides. Silk provides
a similarity measure for geo-linkage that requires that both datasets be annotated with
the WGS 84 ontology. Some of the data sources, e.g., museums in the city of Leo´n,
that were considered in this use case were not annotated with this vocabulary so it was
necessary to use numeric similarity and aggregated euclidean distance to compute the
similarity between two entities. It is not clear if this gives us a precise estimate of the
proximity of two points and it was di cult to validate the adequacy of the links.
          </p>
          <p>Care was taken to ensure that the publication technologies satisfy the licensing and
access policies previously defined.
3.4</p>
        </sec>
      </sec>
      <sec id="sec-3-4">
        <title>Exploitation</title>
        <p>
          Queries can be posed against static data, dynamic data, and a combination of both.
For dynamic data there is no RDF data generation; instead, queries are rewritten by
a SPARQLStream processor, to the underlying stream processing engine which throws
the query results. Our SPARQLStream processor can not yet construct in an optimised
manner queries that combine streaming and static data, and this is a pending task for
which we will adopt some existing strategy [
          <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
          ]. For historical dynamic data, the
SPARQLStream service is used to periodically pose CONSTRUCT queries that generate
RDF. In our case, we have made the data available in two di erent types of endpoints
(one for static data and the other one for dynamic data), and we will soon provide a
map-based interface based on the Map4RDF platform12. The complete description of
the application is available online13 along with sample queries.
4
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Discussion and Open Questions</title>
      <p>
        Some of the main challenges that we have faced in the process of producing and
exploiting data in the context of this case study are:
– The SSN ontology has been applied to the domain of bike sharing systems, which
falls outside areas where the SSN ontology has been extensively used, such as
environmental measurements and agriculture. The ontology has proven to be useful
12 http://www.oeg-upm.net/index.php/es/downloads/172-map4rdf
13 http://transporte.linkeddata.es/
to model the observations and measurements. However, for people not used to the
Observation and Measurements approach, which underlies the SSN ontology, this
type of modelling is complex to understand. Clear descriptions of usage patterns
are needed so that the SSN ontology can be more easily exploited by developers.
– For ontology developers, the SSN ontology still poses some challenges when it has
to be extended. For instance, the treatment of properties that are measured by
sensors is represented through a class, and when it needs to be extended, it is sometimes
unclear how this extension has to be done (e.g., using a subclass or an instance) and
it is unclear how properties can be modelled for better reuse across other ontologies
and domains.
– There is a need to explore when it makes sense to follow a native RDF stream
approach to deal with stream data (e.g., as done in [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]) or an R2RML-based
query rewriting approach, as we do here in our work.
– When using the R2RML approach, there are some limitations in the treatment of
direct and inverse properties and how they can be defined in the R2RML mappings.
This forces ontology developers to overspecify some properties, by defining
properties that are inverse to others that are defined. While this does not really represent
a major problem from an ontology development perspective, it is important to give
clear guidelines to developers in this respect.
      </p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>This work has been supported by the Ciudad2020 INNPRONTA project (IPT-20111006).
We want to thank Boris Villazo´n-Terrazas and Freddy Priyatna for their help during the
RDF generation process.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Villazo</surname>
          </string-name>
          <article-title>´n-</article-title>
          <string-name>
            <surname>Terrazas</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , Vilches-Bla´zquez, L.,
          <string-name>
            <surname>Corcho</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <article-title>Go´mez-Pe´rez, A.: Methodological guidelines for publishing government linked data linking government data</article-title>
          . In Wood, D., ed.:
          <source>Linking Government Data</source>
          . Springer New York (
          <year>2011</year>
          )
          <fpage>27</fpage>
          -
          <lpage>49</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Garijo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <article-title>Villazo´n-</article-title>
          <string-name>
            <surname>Terrazas</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corcho</surname>
            ,
            <given-names>O.:</given-names>
          </string-name>
          <article-title>A provenance-aware linked data application for trip management and organization</article-title>
          .
          <source>In: 7th Int. Conference on Semantic Systems</source>
          . (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Calbimonte</surname>
            ,
            <given-names>J.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corcho</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gray</surname>
            ,
            <given-names>A.J.G.</given-names>
          </string-name>
          :
          <article-title>Enabling ontology-based access to streaming data sources</article-title>
          .
          <source>In: Proc. 9th International Semantic Web Conference</source>
          . (
          <year>2010</year>
          )
          <fpage>96</fpage>
          -
          <lpage>111</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Aberer</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hauswirth</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Salehi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A middleware for fast and flexible sensor network deployment</article-title>
          .
          <source>In: 32nd International Conference on Very Large Databases</source>
          . (
          <year>2006</year>
          )
          <fpage>1199</fpage>
          -
          <lpage>1202</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Calbimonte</surname>
            ,
            <given-names>J.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jeung</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corcho</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aberer</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Enabling query technologies for the semantic sensor web</article-title>
          .
          <source>Int. J. on Semantic Web and Information Systems</source>
          (to appear)
          <volume>8</volume>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Julius</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Christian</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martin</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Georgi</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Discovering and maintaining links on the web of data</article-title>
          .
          <source>In: ISWC2009</source>
          . (
          <year>2009</year>
          )
          <fpage>650</fpage>
          -
          <lpage>665</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Barbieri</surname>
            ,
            <given-names>D.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Braga</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ceri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Valle</surname>
            ,
            <given-names>E.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grossniklaus</surname>
          </string-name>
          , M.:
          <string-name>
            <surname>C-SPARQL:</surname>
          </string-name>
          <article-title>a continuous query language for RDF data streams</article-title>
          .
          <source>Int. J. Semantic Computing</source>
          <volume>4</volume>
          (
          <issue>1</issue>
          ) (
          <year>2010</year>
          )
          <fpage>3</fpage>
          -
          <lpage>25</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Le-Phuoc</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dao-Tran</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parreira</surname>
            ,
            <given-names>J.X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hauswirth</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A native and adaptive approach for unified processing of linked streams and linked data</article-title>
          .
          <source>In: ISWC2010</source>
          . (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>