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,27 @@ A first example illustrates the features of a `tss:Snippet`:
@@ -97,45 +108,55 @@ A <dfn>Data Point</dfn> is a single point of a [=Time Series=] containing an ISO
97
108
98
109
Each [=Snippet=] SHOULD have the following properties:
99
110
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.
111
+
- `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
112
- `tss:from`: starting timestamp (including) of the period covered by `tss:points` using an `xsd:dateTime`.
102
113
- `tss:until`: until this timestamp (excluding) of the period covered by `tss:points` using an `xsd:dateTime`.
103
114
- `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
115
- `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`.
116
+
- `tss:context`: JSON-LD context describing the JSON array of `tss:points`.
107
117
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.
118
+
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
119
110
120
## Data Points ## {#points}
111
121
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:
122
+
`tss:points` MUST be a JSON array with JSON objects (`rdf:JSON` as datatype).
123
+
Each [=Data Point=] itself MUST be a JSON object consisting of 2 required properties and 1 optional property:
114
124
- `time`: the timestamp of the data point using an `xsd:dateTime`.
115
125
- `value`: the value of the data point with corresponding datatype.
116
126
- `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.
141
+
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 as defined in the JSON-LD specification to transform JSON-LD into RDF quads. The following default JSON-LD context is used if no context is specified:
The properties `tss:about` and `tss:pointType` will influence that process.
133
156
134
157
For each [=Data Point=], it can be mapped as follows:
135
158
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
159
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`.
160
+
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.
161
+
4. Similarly, create a triple for the value based on the JSON-LD context.
139
162
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