<!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>Toward Semantic Sensor Data Archives on the Web</article-title>
      </title-group>
      <contrib-group>
        <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>Karl Aberer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>EPFL</institution>
          ,
          <country country="CH">Switzerland</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>architecture for such type of infrastructure. The proposed approach is based on a mix of RDF metadata and raw sensor archives with RDF mappings, so that data can be RDF-ized on demand. We use a real sensor deployment for air quality monitoring as a motivating use case and running example, and we show preliminary results on RDF transformation, compared with a representative data compression algorithm.</p>
      </abstract>
      <kwd-group>
        <kwd>Web Archive</kwd>
        <kwd>Sensors</kwd>
        <kwd>Internet of Things</kwd>
        <kwd>Semantic archives</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>The volume of sensor data on the web is growing at a fast pace, given the
rise of the Web of Things and the increasing availability of data produced by
wearable and mobile devices. Sensor datasets on the web may include weather
and environmental measurements (e.g. MesoWest1), mountain and earthquake
observations (e.g. USGS2), health monitoring readings, or geospatial sensing
results (e.g. Swiss-Experiment3), among many others. These datasets can be
reused for many different purposes. For example, air quality measurements can
be used for training machine learning algorithms; or water pollution readings can
be downloaded to compare with current levels on a different location. Other tasks
include correlation computation and validation of measurements, or automatic
calibration of sensor devices. Moreover, different sensor data sources can be
integrated in a third-party application that produces added value on top of the
original data. For instance, an application may use weather measurements, snow
height observations and radiation levels to feed a mountain avalanche model
simulation.</p>
      <p>
        Open data research has studied the problem of integration of web datasets
in general. As a result, Semantic Web technologies have been shown to provide
useful standards and mechanisms for sharing and reusing data on the Web. The
Linked Data [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] principles provide a well-established blueprint for publishing
data on the Web, and several examples of datasets are already available, following
the RDF4 and SPARQL5 standards. These datasets include archives in different
domains, and the so-called LOD cloud (http://lod-cloud.net/) includes sensor
datasets, such as the LinkedSensorData6 repository. However, these initiatives,
commonly associated to the concept of the Semantic Sensor Web [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], only
target preserving static datasets with little or no dynamics incorporated into
the publishing and data access pipeline. Even if there are emerging efforts for
adapting Linked Data for dynamic Web archiving [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], the usual guidelines for
publishing RDF data on the Web do not always fit the characteristics of sensor
data. More specifically, the generation of RDF from raw data or other data
sources (e.g. using RDB2RDF7 or other triplification engines) has the drawbacks
of verbosity and data model complexity. An RDF representation of a sensor
observation is typically composed of several triples, specifying the observation
value, type of observed property, feature, sensing entity, time annotation, unit of
measurement, etc. Ontology models such as the SSN (Semantic Sensor Networks)
Ontology exemplify this complexity [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Even if this data representation approach
provides a rich formalization and allows complex querying and reasoning, the
volume of data can quickly explode and make it hard to transmit, share and
archive sensor data.
      </p>
      <p>
        In this paper we present some of the key challenges for managing sensor data
archives, from a Semantic Web perspective. Then we propose a set of
requirements and principles for building a semantics-enabled archive, which provides
discovery and access to heterogeneous sensor observations stored in raw
minimalistic formats and databases. These datasets can be made available through
mappings that help transforming the sensor data into RDF on-the-fly. We argue
that this approach can be convenient, compared to RDF materialization, or even
compared with RDF compressed formats for archiving. In addition, we propose
to combine this approach with database RDB2RDF [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] live transformation for
archive queries and filters over the sensor data. To illustrate our study we present
the example of a network of mobile sensors for air quality, which is intended to
publish the collected data publicly, and provides a real-life use case for a sensor
data archive. Finally, we discuss the issues that we found analyzing this topic,
and the potential of our proposed approach. In order to support it, we provide
preliminary experimentation results on real-life datasets.
      </p>
      <p>The remainder of the paper is structured as follows. First we describe the
challenges and requirements of semantic sensor data archives in Section 2. We
present our use case about air quality monitoring in Section 3. Section 4 we
4 Cf. http://www.w3.org/TR/rdf11-primer/
5 Cf. http://www.w3.org/TR/sparql11-overview/
6 Cf. http://wiki.knoesis.org/index.php/LinkedSensorData
7 Cf. https://www.w3.org/2001/sw/rdb2rdf/
provide more concrete details about the principles and architecture of our archive
approach. Section 5 contains a discussion about the potential of our approach,
supported by preliminary experimentation. Section 6 concludes the paper.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Challenges in Sensor Data Archives</title>
      <p>
        Sensor data is used in a very large range of applications, and the requirements in
each of these are also numerous. Nevertheless, it is possible to identify basic
requirements for those cases where sensor data needs to be preserved and archived
for future access and re-use. This is common case in sensor data management,
given that sensor data is usually only an initial input for further processing,
which can be performed online (e.g. for alerts and real-time services) or offline
(e.g. for batch processing and historical data analytics) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Therefore, even if the
sensor datasets have already been processed, they may be required for
verification, replay, used as training data or for provenance checks and reproducibility
of results. In the following, we describe some of the main aspects to consider
in sensor data archives in this context, and the corresponding requirements and
associated challenges.
      </p>
      <p>
        Discoverability. This is a key aspect for sensor data archives, as they need first
to be identified before being useful for any purpose. These include:
discoverability, storage, reusability, accessibility, and interoperability. These datasets provide
first-hand raw information about events in a particular domain of interest, but
are of no use if the subject of sensing cannot be identified and searchable. In
this respect, explicit semantics on the sensor metadata have shown to be useful,
as they provide a common understanding of the objects of sensing, thanks to
agreed models such as the SSN (Semantic Sensor Networks) Ontology [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], or
similar formalizations. Following the SSN terminology, we can identify essential
discovery criteria for sensor data, including:
– The observed property, or quality that is observed by the sensor, e.g.
temperature, CO2 level, etc.
– The feature of interest, or object of which a quality is observed, e.g. the air
at some location, a person, a room, etc.
– The sensor or type of sensor. Sensors can be physical or logical, they can
be artificial or natural, or even abstract entities that capture observations.
Types of sensors can be defined in terms of a taxonomy or also by other
attributes inherents to the sensor (capabilities, model, etc.)
– The location, i.e. where the observations are made. Sensors can also be
mobile, and therefore a location can be dynamic over time, but include a limited
spatial coverage.
– The temporal extent, i.e. when the observations were made. This can be
thought as time intervals or more complex time constraints that the archived
observations should match.
      </p>
      <p>Storage. Persistence of sensor data is not always required. In many applications
sensor data is consumed live and only aggregations or specific events are stored
permanently. However, when either original or derived sensor data needs to be
preserved, different archival options are available. In large sensor data archives
there is a need for reducing volume as much as possible, using compressed formats
if necessary. While in some cases storage can be provided through a database, this
is not always the case as the querying and transactional requirements of these
archives are often less critical than for live sensor data. In fact it is commonplace
to find silos of sensor data in the form of compressed files. Choosing an adequate
data format and compression mechanism is important for later stages as we will
see afterwards. Other persistence considerations related to infrastructure such
as replication or backup go beyond our analysis, but should not be disregarded.
Reusability. One of the main reasons for maintaining sensor data archives is the
possibility of reusing the data for other purposes, potentially different for those
for which they were originally collected. Archived sensor data can be very useful
for different purposes. For instance for comparing sensor data from another
location or from another sensor network of comparable characteristics. They can
also be used for calibration purposes or for finding correlations. They can also be
used for historical and batch analysis, for benchmarking or as training datasets
for data mining algorithms. Another common sue case is for feeding numerical
models that simulate physical phenomena. All these reusability use cases would
not be possible if the data consumers are not able to determine the nature of
the sensor data, i.e. a description of what is sensed, under which units, on what
time range, locations, etc.</p>
      <p>Accessibility. Data access should be possible through APIs and protocols that
allow automation of data consumption from both people and software
applications. The usage of de-referenceable URIs is a starting point for guaranteeing a
simple but effective retrieval of sensor data. The SPARQL language can provide
additional querying mechanisms that allow selecting relevant parts of the data
declaratively. However, complex queries are not always required for slicing sensor
data archives. In most cases simple time interval selections or similar filters are
just enough, so it is often more useful to allow very simple access mechanisms
on such datasets.</p>
      <p>Interoperability &amp; Standardization. The RDF and SPARQL standards are
a building block for publishing data, and in our case, archives on the web. Specific
ontologies and vocabularies, such as the Semantic Sensor Network (SSN)
ontology can be used to represent both sensor metadata, and observations. Moreover,
there exist domain specific ontologies that can be plugged to SSN, targeting, for
instance, environmental monitoring, health sensing, manufacturing, etc. Other
vocabularies have been standardized for describing a catalog8, and can help for
enabling the discoverability of sensor datasets.</p>
      <sec id="sec-2-1">
        <title>8 DCAT: https://www.w3.org/TR/vocab-dcat/</title>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Air Quality Monitoring: A Use Case</title>
      <p>
        We introduce a relevant use case for sensor data archives, which is centered on
the area of air quality monitoring. Ambient air quality in the context of a city
can be assessed in function of different pollutants present in the air, emitted
and produced by different sources and having distinct characteristics, and of
consequently different ways of being detected. Pollutants include, among
others, Carbon monoxide (CO), Nitrogen dioxide (NO2), Nitrogen monoxide (NO),
Sulfur dioxide (SO2), Ground level Ozone (O3), Particulate matter (PM) and
Lead (Pb). These pollutants are produced by incomplete combustion processes,
transportation, industrial and household combustion, and reactions of other
pollutants. Considering the high impact of air quality, not only on the health and
lifestyle of citizens, but also on the rest of the components of an urban
settlement [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], its study has become a global concern. In fact, it is estimated
that around 7 million premature deaths are attributable to air pollution [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]
worldwide. For these reasons, air quality sensor data attracts the interest of
interdisciplinary teams, with particularly different goals. Data consumers of these
datasets may include public health researchers, governmental planning staff,
environmental scientists, medical practitioners, traffic control agencies, etc.
      </p>
      <p>The OpenSense9 project aims at integrating air quality measurements
captured by heterogeneous mobile and crowdsensed data sources, in order to
understand the health impacts of urban air pollution exposure, and providing
highresolution air quality maps. Urban air quality requires a complex deployment of
sensors, as the one we propose in OpenSense, composed of devices mounted on
public transportation, and personal mobile sensors (Figure 1). OpenSense allows
not only monitoring the concentration of pollutants, but also letting this
information be visible and accessible publicly, so that citizens can learn and adapt
their behavior to the measured conditions. This data management life-cycle, is</p>
      <sec id="sec-3-1">
        <title>9 OpenSense project: http://opensense.epfl.ch</title>
        <p>
          orchestrated by the GSN (Global Sensor Networks [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]) middleware, from data
acquisition to publishing and data access.
        </p>
        <p>The data collection from the sensors produces time series of the air
pollutant measurements, which are only the first step in the OpenSense pipeline. The
resulting dataset consists of raw observations that cannot be directly used by
citizens and external applications. To understand the semantics of this data,
additional processing is required, exploiting first the spatial characteristics of
the data points. Given the highly localized nature of air pollutant
concentrations (due to physical behavior characterized in models such as street canyons),
we need to project the observations to street segments and perform spatial
aggregation and interpolation. Once the spatio-temporal distributions have been
computed and made available, pollution maps can be generated, complemented
or validated with this data, leading to more advanced air quality models: e.g.
loglinear regression models, lagrangian dispersion models, etc. Finally, using these
models, end-user applications can be built leveraging on the processed datasets.</p>
        <p>In sum, we can see that OpenSense introduces the need to deal with a large
number of sensing devices, which are potentially very different in terms of
capabilities (e.g. accuracy, resolution, precision, reliability, etc.). Furthermore, there
is a need to access and process their data not online live, but also offline, given
the numerous potential uses of the resulting datasets. Also, these datasets can be
potentially integrated in order to gain more insights or combine with higher level
models. Given the large number of sensors and large volumes produced by each
of them, it is certainly necessary to transmit, store and share these datasets s
efficiently as possible. As we can see, most of the requirements previously stated
apply to an archive based on the data produced by the OpenSense project.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>A Semantically-enabled Sensor Data Archive</title>
      <p>In this section we present the main design principles for a sensor data archive
that incorporates semantic data management at its core, in order to cope with
some of the requirements described previously in Section 2.
4.1</p>
      <sec id="sec-4-1">
        <title>Design Principles</title>
        <p>Based on the challenges and requirements identified in Section 2, and our
experience in previous sensor data monitoring systems and projects (e.g.
SwissExperiment, OSPER, OpenSense, OpenIoT (http://openiot.eu), D1namo10), we
advocate for an archiving approach that exploits semantic sensor metadata and
raw sensor data, under the following considerations.</p>
        <p>Sensor data regularity: Raw sensor data is typically collected as time
series of data items, presenting in most cases a very regular structure. Consider
the example of mobile NO2 sensor readings in Listing 1. These are series of
tuples that contain a timestamp, the sensor identifier, the observed value and the
geographical coordinates:
10 Cf. http://www.nano-tera.ch/projects/456.php
29-02-2016T16:41:24,47,369,46.52104,6.63579
29-02-2016T16:41:34,47,358,46.52344,6.63595
29-02-2016T16:41:44,47,354,46.52632,6.63634
29-02-2016T16:41:54,47,355,46.52684,6.63729
...</p>
        <p>Listing 1: Example of mobile NO2 sensor readings.</p>
        <p>The regularity of these datasets is a a common characteristic that can be
exploited for archiving purposes. Compact representations, such as CSV for
humanreadable purposes, can be used fairly easily, allowing users to share and reuse
these datasets and load them into analytic infrastructures or visualization tools.</p>
        <p>Furthermore, this regularity is extremely useful for data compression
purposes, which can make data storage and interchange faster and more efficient.
Nevertheless, this compact representation lacks minimal information to be useful
by third parties.</p>
        <p>As we will see later we propose to associated semantic metadata and RDF
mappings to interpret and understand these time series.</p>
        <p>Sensor data order: In these archives the order of sensor data is crucial. Given
that these come from sensor streams, time is typically the key attribute for
establishing an order among the data items. This is important for indexing the
data items, allowing for fast insertions in append mode, which are generally
optimized in database and file storage systems. This also enables efficient time-based
selection, filtering and windowing over the data, which are common operators in
this context.</p>
        <p>Sensor metadata: The metadata is essential in order to allow discoverability
and self-description of sensor datasets. The metadata includes not only
information about the sensor and its characteristics, but also meta-information about
the generated datasets and how they can be accessed and exploited. The
usage of existing vocabularies is critical at this level, and the usage of standards
is recommended. First, for the dataset metadata we propose using the DCAT
vocabulary, which allows defining catalogs and datasets. For instance, a sensor
catalog for OpenSense can be specified as follows:
:sensorCatalog a dcat:Catalog ;
dct:title "OpenSense data catalog" ;
dct:language iso639-1:en ;
dct:publisher :LSIR-EPFL ;
foaf:homepage &lt;http://opensense.epfl.ch/data/&gt; ;
dcat:dataset :geo-osanm, :geo-osfpm , :geo-oso3m .</p>
        <p>Listing 2: Example of sensor catalog metadata in OpenSense.</p>
        <p>A catalog may include several datasets, e.g. one dataset can represent one
time series produced by a sensor. A dataset can also group several sensor
readings, especially if these are related to the same observed property or the same
geographical space. These aggregations can be configured as virtual sensors. As
an example, consider a NO2 dataset produced by a virtual sensor that aggregate
data from several sensor boxes. The dataset metadata can include the temporal
and spatial extent. Furthermore the dataset metadata can be combined with the
SSN ontology, in order to include specific information about the sensor, such as
measurement capabilities, calibration, etc. (Listing 3).
:geo-osanm a dcat:Dataset;
dct:title "OpenSense NO2 measurements";
dcat:theme :NO2;
dct:issued "2015-12-05"^^xsd:date;
dct:temporal g-interval:1977-11-01T12:22:45/P1Y;
dct:spatial &lt;http://www.geonames.org/6695072&gt;;
dct:publisher :LSIR-EPFL;
dct:accrualPeriodicity sdmx:freq-W;
ssn:isProducedBy :NO2VsensorBox;
dcat:distribution :geo-osanm-csv .
:NO2VsensorBox a ssn:Sensor;
rdfs:label "NO2 Virtual Sensor Lausanne";
ssn:observes :NO2;
ssn:hasMeasurementCapability [
a ssn:Accuracy;
ssn:forProperty :NO2;
ssn:inCondition ... ;
ssn:hasValue ... ] .</p>
        <p>Listing 3: Example of metadata for an OpenSense NO2 dataset.</p>
        <p>Finally, for each dataset we may have different distributions. In our case, we
can expose the sensor observations as CSVs, which can be represented as follows:
:geo-osanm-csv a dcat:Distribution ;
dcat:downloadURL &lt;http://opensense.epfl.ch/data/api/sensors/geo_osanm&gt;;
dct:title "CSV distribution of NO2 measurements";
dcat:mediaType "text/csv";
dcat:byteSize "5534530"^^xsd:decimal .</p>
        <p>Listing 4: Example of a Dataset Distribution metadata.</p>
        <p>Semantically-enabled sensor data: While the sensor data archive chiefly
serves raw data accompanied with semantic sensor metadata, it may be needed
to provide a semantically-enabled version of the data, so that it can be
further integrated, processed or reasoned upon. In order to do so we propose using
R2RML mappings (and related extensions) to transform the compact raw sensor
data into semantics-rich RDF datasets. While we could think of storing
materialized RDF datasets, this may result not too convenient for the following reasons.
First, data may be updated periodically, and therefore we would need to
maintain a synchronization service that permanently runs this conversion, taking up
additional resources. Second, the RDF versions of the dataset can grow up to
multiple orders of magnitude with respect to the original dataset. This verbosity
can quickly overload the archive resources, and it can be cumbersome for data
interchange. Third, given that sensor data present recurring patterns, the RDF
representation can be unnecessarily repetitive (e.g. the same unit of
measurement, same feature of interest, same observed property, making it harder for
data consumers to focus on the essential information contained in the archive.
Finally, a materialized RDF dataset would be too rigid if the data consumers
need to use a different ontology or vocabulary for the same dataset. It may be
required to use different ontologies for integration purposes, or for focusing on
different aspects of the dataset (e.g. using a statistics ontology for some tasks,
or a provenance ontology for others).</p>
        <p>
          Bulk data access: The bulk data download should enable not only the access
to the raw data, but also to alternative formats including JSON (http://json.
org/), NetCDF (http://www.unidata.ucar.edu/software/netcdf/), or other available
options, which may vary depending on the domain of discourse. Nevertheless,
when the data is required to be transformed to RDF, we propose using the SSN
ontology, and more specifically the observation module. The usage of the SSN
ontology is appropriate as it is domain-agnostic [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] and has shown wide
adoption and application in different scenarios. An example of an NO2 observation,
including a value, result time and other details can be encoded as follows:
:no2obs1 a :NO2Observation ;
ssn:observedProperty :NO2 ;
ssn:featureOfInterest aq:AirMedium ;
ssn:observedBy :NO2SensorBox ;
ssn:observationResult :no2obs1result ;
ssn:observationResultTime :instant_20160331232000 .
:no2obs1result a :NO2ObservationValue ;
qu:numericalValue "345.00"^^xsd:float ;
qu:unit :ppm .
:instant_20160331232000 a time:Instant ;
time:inXSDDateTime "2016-03-31T23:20:00"^^xsd:datetime .
        </p>
        <p>Listing 5: Example of an NO2 observation in RDF using the SSN ontology.</p>
        <p>Time-based selection &amp; filtering: Although one of the main tasks in the
proposed sensor data archive is related to the direct download of a dataset, it is
also crucial to provide minimal selection features, especially given that users are
typically only interested in a part of the dataset, rather than the full version. The
most commonly requested type of selection is based on time filters, which
establish temporal bounds, defined as an interval of two-timestamps. Other special
cases include gathering the latest values, a particular point in time, an
interval defined with an offset, or even seasonal and periodic queries. Given that the
archive is ordered, and potentially indexed with respect to time, these operations
should be optimized and supported out of the box.</p>
        <p>
          Additional operations such as basic temporal analysis and simple anomaly
detection are also commonly required in a sensor archive [
          <xref ref-type="bibr" rid="ref17 ref4">4, 17</xref>
          ]. While such
additional considerations are relevant, for the sake of simplicity we do not expand
on these and other related topics.
4.2
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Architecture</title>
        <p>We propose an abstract architecture (Figure 2) for a Semantic Sensor Data
Archive, which includes features that answer to the requirements above, and
follows the principles described previously.</p>
        <p>First, in terms of storage we envision three main storage components. One
targets long term stored datasets, in formats such as CSV (although other
formats can also be included). The second is a database (the underlying technology
of this database could be of different kinds) which is used for those datasets
where more flexible filtering and selection policies are allowed. This can be of
interest for very large datasets where the complete body of data is too large an
unnecessary for consumers. It is perfectly possible that the stored datasets can
be loaded into the database store (e.g. load a CSV into a database). Therefore,
a transition between these two is a possibility. The third an final storage
component in the metadata store, which contains the dataset annotations in RDF,
as described in the example above.</p>
        <p>In addition to these stores we propose a mappings repository that stores the
R2RML-extended mappings that specify how to produce live RDF from the long
term storage datasets and the database. In the following example (Listing 6) we
present a sample pair of R2RML mappings that aim at producing instances of
NO2 Observations and their corresponding Observation values. The first
mapping defines how the observation value is produced. Its URI is defined using a
template for the subjectMap, which replaces the sensor and time column values at
runtime to produce the final URI value. Then the observation numerical value –
i.e. the actual observed NO2 value– is mapped through a predicateObjectMap with
a fixed predicate qu:numericalValue. The unit of measurement is fixed through
another R2RML mapping not depicted here, for space constraints.
:ObsValueMap
rr:subjectMap [</p>
        <p>rr:template "http://opensense.epfl.ch/data/ObsResult_NO2_{sensor}_{time}"];
rr:predicateObjectMap [</p>
        <p>rr:predicate qu:numericalValue; rr:objectMap [ rr:column "no2"; rr:datatype xsd:float; ]];
rr:predicateObjectMap [</p>
        <p>rr:predicate obs:uom; rr:objectMap [ rr:parentTriplesMap :UnitMap; ]].
:ObservationMap
rr:subjectMap [</p>
        <p>rr:template "http://opensense.epfl.ch/data/Obs_NO2_{sensor}_{time}"];
rr:predicateObjectMap [
rr:predicate ssn:observedProperty;
rr:objectMap [ rr:constant opensense:NO2]];
rr:predicateObjectMap [
rr:predicate ssn:observedBy;
rr:objectMap [ rr:template "http://opensense.epfl.ch/data/Sensor_{sensor}"]];
rr:predicateObjectMap [
rr:predicate obs:result; rr:objectMap [ rr:parentTriplesMap :ObsValueMap]].</p>
        <p>Listing 6: Example of an R2RML mapping for an OpenSense NO2 dataset.</p>
        <p>
          For the observation itself, the ObservationMap mapping follows a similar
structure. Again, the URI is constructed with a template that uses the sensor and
time columns. It specifies the observed property, using a fixed URI, and the
observing sensor using a URI template. The Observation value is linked through a
parentTriplesMap reference. More information on R2RML is available in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
        </p>
        <p>
          While these mappings can be conveniently used for on-demand
transformation to RDF of sensor data in bulk and filtering data access, RDF is oftentimes
not the most convenient representation for data sharing and transmission. With
these considerations in mind, we opt for a commonly use format for sensor
observations as CSV, but augmented with rich semantic descriptions that follow
the specifications of the CSV on the Web Working Group11. As an example of
embedded metadata that can be provided for the OpenSense data sets, consider
the JSON snippet below (Listing 7). It represents a description of a CSV output
of sensor data from the GSN middleware, using the metadata model defined by
the CSV on the Web group [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ].
{
11 CSV on the Web http://www.w3.org/TR/csv2rdf/
        </p>
        <p>The (simplified) example provides an explicit description of the columns
of a CSV table consiting of NO2 observations in OpenSense. Following the
CSV2RDF conversion standards of the CSV on the Web recommendations, RDF
can be generated as follows. First, the time column will generate a triple, whose
subject is the observation IRI, that will be linked to the date-time through
the ssn:observationResultTime. Similarly, the sensor column defines metadata that
links to the URI of the sensor that produced the observation. The definition in
the no2 column will generate a relationship with the observation value. In
addition, the CSV on the Web specification allows defining virtual columns, which
are useful to create more than one subject per CSV row (e.g. for the units, and
for the observation type).</p>
        <p>
          This approach can be interesting for data consumers that are not necessarily
familiar with Semantic Web standards, as it comes in the form of a seemingly
ordinary CSV. Nevertheless, thanks to the CSV-to-RDF standard
transformations encoded in the metadata, it is easier to interpret the dataset as a set of
RDF triples. An important issue is related to the capability of current RDF
triple stores to handle streams of very dynamic RDF data. While it is certainly
technically possible to store and archive data in such databases [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], it remains a
challenge to perform continuous processing and stream data querying over RDF
Streams. The ongoing work at the W3C RDF Stream Community Group12, and
the current prototypes that follow this new processing paradigm can use the
stream of data produced by the OpenSense deployment as an input for more
advanced continuous query processing.
5
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Discussion</title>
      <p>The presented architecture and approach for a Semantic Sensor Data archive
considers some of the basic requirements for such an infrastructure. One of this
aspects is related to the efficiency of transmission and interchange. A possible
alternative to our proposal could be to use RDF as a representation format all the
way down to the storage level. The advantage of this would be that no mappings
would be needed in order to transform from raw data sources such as databases
and CSV files. Furthermore, users could directly query these data sources with
SPARQL. However, as we discussed previously, for the typical archival use cases
a complex query language such as SPARQL is not essential for data retrieval,
and even less for bulk data acquisition. In addition, sensor observation data is
12 W3C RSP Community Group: http://www.w3.org/community/rsp
commonly better understood in simple tabular and time-series formats, rather
than in graph-based structures such as RDF.</p>
      <p>
        Another important aspect is size and storage. As stated above, sensor
observation data can be huge ad efficiency for transmission and interchange is
vital. RDF, in its many serializations remains too verbose, even for very simple
datasets such as observation values. Compression mechanisms exist to overcome
this issue, which have shown to greatly reduce the amount of bytes to store
graphs and triples [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. These includes among others, binary representations such
as HDT [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], or stream-aware approaches such as RDSZ [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] and ERI [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
Compression algorithms such as ERI take advantage of the repeating nature of a
dataset. This is a common property on most sensor observation data sources, as
we saw previously, and therefore these algorithms could be used in our context.
We have developed a proof of concept implementation of our approach for
representing sensor observations as CSV, including mappings that allow transforming
the dataset into RDF triples.
      </p>
      <p>
        We have compared our approach with the optimized ERI interchange
format for RDF. As a preliminary evaluation, we used the Linked Sensor Data [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]
datasets, most specifically the Nevada dataset that contains observations about
environmental properties during blizzard and hurricane events. As we can see
in Figure 3(a), for 38 million triples, the transformation of the compressed CSV
format+mappings, into RDF, is reduced from around 8GB to 214MB. Compared
to the ERI representation (147MB) our approach offers a very competitive size,
which is not even binary-compressed and is directly human-readable.
Furthermore, if we apply a simple zip compression on top of our approach we get an
even more compact pack of only 19MB. In terms of decompression time, our
approach throws similar execution time as ERI, as we can see in Figure 3(b).
      </p>
      <p>While these results apply for bulk transfer and interchange, we are also
interested in how this would result for query filtering. We have performed preliminary
experiments, running the on-demand RDF transformation on top of a Postgres
relational database containing the Nevada Linked Sensor Data. The filtering
data results in Figure 4 show that the RDF transformation time has a linear
growth as the number of observation points increases.</p>
      <p>
        Data format transformation can potentially become an issue, if the
heterogeneity of sources is not taken into account. CSV is not the only possible input
format for RDF streams, and optimizations to efficiently transform data online
or in batch mode are essential. Related solutions such as XSPARQL [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] or live
RDF Stream generation [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] can be complementary in this context.
6
      </p>
    </sec>
    <sec id="sec-6">
      <title>Conclusions &amp; Future Work</title>
      <p>We have presented an architecture for sensor data archives, which incorporates
Semantic Web standards at its core, in order to enhance discoverability,
accessibility, interoperability and data sharing. We advocate for the use of hybrid sensor
data storage, including RDF metadata for sensor description, using standards
based on the SSN ontology. Furthermore, we consider using simple formats for
sensor observations data exchange, such as CSV, augmented with semantic
annotations in JSON,following the W3C Recommendations for CSV on the Web.
Finally, we have scoped our work and presented it as part of a real sensor data
archive for Air Quality Monitoring, which is expected to implement the proposed
architecture.</p>
      <p>In the future we plan to complete and showcase the semantic-aware features of
our sensor data archive in OpenSense, comparing it to alternative approaches for
data archiving and preservation. We plan to investigate on further optimizations
regarding sensor data compression, including value encoding and approximation,
or pre-compilation of mapping-based transofrmations. Furthermore, we plan to
design and publish open-source sensor data crawlers that will be able to exploit
the sensor metadata exposed by this type of archives.</p>
      <p>Acknowledgments Partially supported by the Nano-Tera.ch OpenSense2 project,
evaluated by the Swiss National Science Foundation.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Berners-Lee</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hendler</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>Publishing on the semantic web</article-title>
          .
          <source>Nature</source>
          <volume>410</volume>
          (
          <issue>6832</issue>
          ),
          <fpage>1023</fpage>
          -
          <lpage>1024</lpage>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bischof</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Decker</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krennwallner</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lopes</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polleres</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Mapping between rdf and xml with xsparql</article-title>
          .
          <source>Journal on Data Semantics</source>
          <volume>1</volume>
          (
          <issue>3</issue>
          ),
          <fpage>147</fpage>
          -
          <lpage>185</lpage>
          (
          <year>2012</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>Sarni</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eberle</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aberer</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Xgsn: An open-source semantic sensing middleware for the web of things</article-title>
          .
          <source>In: Proc. of the 7th International Workshop on Semantic Sensor Networks</source>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Chandola</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Banerjee</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Anomaly detection: A survey. ACM computing surveys (CSUR) 41(3</article-title>
          ),
          <volume>15</volume>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Compton</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barnaghi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bermudez</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>García-Castro</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corcho</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cox</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Graybeal</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hauswirth</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Henson</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Herzog</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Janowicz</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kelsey</surname>
            ,
            <given-names>W.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Phuoc</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lefort</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leggieri</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neuhaus</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nikolov</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Page</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Passant</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sheth</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taylor</surname>
          </string-name>
          , K.:
          <article-title>The SSN ontology of the W3C semantic sensor network incubator group</article-title>
          .
          <source>Journal of Web Semantics</source>
          <volume>17</volume>
          ,
          <fpage>25</fpage>
          -
          <lpage>32</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Das</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sundara</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cyganiak</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>R2RML: RDB to RDF Mapping Language</article-title>
          . https://www.w3.org/TR/r2rml/ (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Fernández</surname>
            ,
            <given-names>J.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gutierrez</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martínez-Prieto</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          :
          <article-title>Rdf compression: basic approaches</article-title>
          .
          <source>In: Proceedings of the 19th international conference on World wide web</source>
          . pp.
          <fpage>1091</fpage>
          -
          <lpage>1092</lpage>
          . ACM (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Fernández</surname>
            ,
            <given-names>J.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Llaves</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corcho</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Efficient rdf interchange (eri) format for rdf data streams</article-title>
          .
          <source>In: The Semantic Web-ISWC</source>
          <year>2014</year>
          , pp.
          <fpage>244</fpage>
          -
          <lpage>259</lpage>
          . Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Fernández</surname>
            ,
            <given-names>J.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martínez-Prieto</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gutiérrez</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polleres</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Arias</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Binary rdf representation for publication and exchange (hdt)</article-title>
          .
          <source>Web Semantics: Science, Services and Agents on the World Wide Web</source>
          <volume>19</volume>
          ,
          <fpage>22</fpage>
          -
          <lpage>41</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Fernández</surname>
            ,
            <given-names>J.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polleres</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Umbrich</surname>
          </string-name>
          , J.:
          <article-title>Towards efficient archiving of dynamic linked open data</article-title>
          .
          <source>Proc. of</source>
          DIACHRON pp.
          <fpage>34</fpage>
          -
          <lpage>49</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Fernández</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Arias</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sánchez</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fuentes-Lorenzo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , Corcho, Ó.:
          <article-title>Rdsz: an approach for lossless rdf stream compression</article-title>
          .
          <source>In: The Semantic Web: Trends and Challenges</source>
          , pp.
          <fpage>52</fpage>
          -
          <lpage>67</lpage>
          . Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Mauri</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calbimonte</surname>
            ,
            <given-names>J.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Balduini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Della</given-names>
            <surname>Valle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Aberer</surname>
          </string-name>
          ,
          <string-name>
            <surname>K.</surname>
          </string-name>
          , et al.:
          <article-title>Where are the rdf streams?: Deploying rdf streams on the web of data with triplewave</article-title>
          .
          <source>In: 14th International Semantic Web Conference ISWC</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Organization</surname>
            ,
            <given-names>W.H.</given-names>
          </string-name>
          :
          <article-title>News release</article-title>
          . http://www.who.int/mediacentre/news/ releases/2014/air-pollution/en/.
          <source>(March</source>
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Sheth</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Henson</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sahoo</surname>
            ,
            <given-names>S.S.:</given-names>
          </string-name>
          <article-title>Semantic sensor web</article-title>
          .
          <source>Internet Computing, IEEE</source>
          <volume>12</volume>
          (
          <issue>4</issue>
          ),
          <fpage>78</fpage>
          -
          <lpage>83</lpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Tennison</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kellogg</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Herman</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Model for tabular data and metadata on the web</article-title>
          . http://www.w3.org/TR/tabular
          <article-title>-data-model/ (</article-title>
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Tsai</surname>
            ,
            <given-names>D.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guessous</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Riediker</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paccaud</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gaspoz</surname>
            ,
            <given-names>J.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Theler</surname>
            ,
            <given-names>J.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Waeber</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vollenweider</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bochud</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Short-term effects of particulate matters on pulse pressure in two general population studies</article-title>
          .
          <source>Journal of hypertension 33(6)</source>
          ,
          <fpage>1144</fpage>
          -
          <lpage>1152</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Vuran</surname>
            ,
            <given-names>M.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Akan</surname>
          </string-name>
          , Ö.B.,
          <string-name>
            <surname>Akyildiz</surname>
            ,
            <given-names>I.F.</given-names>
          </string-name>
          :
          <article-title>Spatio-temporal correlation: theory and applications for wireless sensor networks</article-title>
          .
          <source>Computer Networks</source>
          <volume>45</volume>
          (
          <issue>3</issue>
          ),
          <fpage>245</fpage>
          -
          <lpage>259</lpage>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>