You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Abstract: An RDF Time Series Snippet is a segment of data points from a time series dataset, typically used for analysis or visualization. The specification uses [SPARQL Common Data Types](https://awslabs.github.io/SPARQL-CDTs/spec/latest.html) coined by AWS Lab to encode the data points in a values literal. The entity can then be used for annotating this snippet, which is a time interval subset of a potentially larger time series.
11
+
Abstract: An RDF Time Series Snippet is a segment of data points from a time series dataset, typically used for analysis or visualization. The specification uses JSON to store the data points to allow re-usability of existing tooling for analyzing time series. The entity can then be used for annotating this snippet, which is a time interval subset of a potentially larger time series.
12
12
Markup Shorthands: markdown yes, css no
13
13
</pre>
14
14
15
15
# Introduction # {#intro}
16
16
17
17
Sensor observations, positioning data, measurements, mobility information... are commonly published as Time Series data with a timestamp and a value.
18
18
Representing Time Series data in RDF drastically raises the verbosity, as each data point is often given its own identifier, for which contextual information is repeated on all data points.
19
-
With Time Series Snippets, we allow a data publisher to compact the data points in subsets of a Time Series, called the Snippet, by using [SPARQL Common Data Types](https://awslabs.github.io/SPARQL-CDTs/spec/latest.html) such as `cdt:List` and `cdt:Map`.
19
+
With Time Series Snippets, we allow a data publisher to compact the data points in subsets of a Time Series, called the Snippet with JSON objects, allowing to re-use existing tooling for analyzing time series.
20
20
This way, you can greatly reduce the amount of triples when describing a Time Series.
21
21
22
22
Time Series Snippets use the following prefix and namespace:
@@ -32,16 +32,26 @@ A first example illustrates the features of a `tss:Snippet`:
@@ -97,45 +107,42 @@ A <dfn>Data Point</dfn> is a single point of a [=Time Series=] containing an ISO
97
107
98
108
Each [=Snippet=] SHOULD have the following properties:
99
109
100
-
- `tss:points`: a `cdt:List` of data points where each data point is a `cdt:Map` with a `time` key using `xsd:dateTime` value, with a `value` key for which the value is annotated with a datatype, and optionally an `id` key for which the value is an IRI for the current data point.
110
+
- `tss:points`: a JSON array (datatype `rdf:JSON`) of data points where each data point is a JSON object with a `time` key using `xsd:dateTime` value, with a `value` key for which the value is annotated with a datatype, and optionally an `id` key for which the value is an IRI for the current data point.
101
111
- `tss:from`: starting timestamp (including) of the period covered by `tss:points` using an `xsd:dateTime`.
102
112
- `tss:until`: until this timestamp (excluding) of the period covered by `tss:points` using an `xsd:dateTime`.
103
113
- `tss:about`: contains statements about a blank node. The statements can be asserted on top of all data points in `tss:points` when expanding the Snippet.
104
114
- `tss:pointType`: the RDF type of all data points in `tss:points`.
105
-
- `tss:timePath`: the path to use for expanding the `time` property in `tss:points`.
106
-
- `tss:valuePath`: the path to use for expanding the `value` property in `tss:points`.
115
+
- `tss:context`: JSON-LD context describing the JSON array of `tss:points`.
107
116
108
-
Issue: Discuss whether these properties are required or optional. E.g., a publisher might decide to do a lossy conversion for their goal, and not include valuePath, pointType and timePath. However, we can still analyze and visualize the data without that information.
117
+
Issue: Discuss whether these properties are required or optional. E.g., a publisher might decide to do a lossy conversion for their goal, and not include a JSON-LD context or pointType. However, we can still analyze and visualize the data without that information.
109
118
110
119
## Data Points ## {#points}
111
120
112
-
`tss:points` MUST have a `cdt:List` as datatype. Each [=Data Point=] itself MUST be a `cdt:Map` consisting
113
-
of 2 required properties and 1 optional property:
121
+
`tss:points` MUST be a JSON array with JSON objects (`rdf:JSON` as datatype).
122
+
Each [=Data Point=] itself MUST be a JSON object consisting of 2 required properties and 1 optional property:
114
123
- `time`: the timestamp of the data point using an `xsd:dateTime`.
115
124
- `value`: the value of the data point with corresponding datatype.
116
125
- `id`: the data point identifier is optionally. When set, this MUST be a named node.
When `tss:timePath` and `tss:valuePath` are set (mind this is not required), a [=Snippet=] can be expanded to a verbose RDF representation, for example using its original vocabulary.
140
+
When the optional JSON-LD context is provided through `tss:context`, a [=Snippet=] can be expanded to a verbose RDF representation, for example using its original vocabulary.
132
141
The properties `tss:about` and `tss:pointType` will influence that process.
133
142
134
143
For each [=Data Point=], it can be mapped as follows:
135
144
1. When the `id` is set and it is a valid IRI, set this id as the subject. If it is not, create a new blank node and set this as the subject.
136
145
2. When `tss:pointType` is set, create a triple stating this id is of `rdf:type` the object of the pointType triple.
137
-
3. Create a triple for the time based on the `tss:timePath`. For unknown intermediary named nodes, a blank node is to be created.
138
-
4. Similarly, create a triple for the value based on the `tss:valuePath`.
146
+
3. Create a triple for the time based on the JSON-LD context. For unknown intermediary named nodes, a blank node is to be created.
147
+
4. Similarly, create a triple for the value based on the JSON-LD context.
139
148
5. Now apply the `tss:about` blank node entity to this point.
140
-
141
-
Issue: Discuss whether a SHACL Path makes sense to use as the intermediary steps will be mapped to blank nodes. Probably we could simplify here and make this a `tss:timeProperty` instead?
0 commit comments