[data-shapes] Use case: time series data repairs (#560)

robert-david has just created a new issue for https://github.com/w3c/data-shapes:

== Use case: time series data repairs ==
This use case is about fixing invalid data in time series. The time series consists of a number of observations (`sosa:Observation`), which each have a measurement value (`sosa:hasSimpleResult`) and a time stamp (`sosa:resultTime`). The measurements occur every 15 minutes, so the observations have time stamps within 15 minutes of each other.

Problems occurring in time series are I) missing observations (a time stamp with +-15 minutes is missing), ii) a value that is not a number (measurement error) and iii) a value that is outside the normal measurement interval (outlier).

To fix i), the rules should infer missing observations based on the time stamp.
To fix ii) and ii), the rules should infer a new valid value based on a function, e.g. the average value of the surrounding (+-15 minutes) values or a similar, potentially more complex, formula.

Example observation:
```
@prefix sosa: <http://www.w3.org/ns/sosa/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[] a sosa:Observation ;
    sosa:hasSimpleResult "35.381"^^xsd:float ;
    sosa:resultTime "1970-01-01T20:45:00"^^xsd:dateTime .
```

Shape to validate an observation using SHACL Core:
```
@prefix : <http://example.com/ns#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix sosa: <http://www.w3.org/ns/sosa/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:Shape a sh:NodeShape;
    sh:targetClass sosa:Observation;
    sh:property [
        sh:path sosa:hasSimpleResult;
        sh:minCount 1;
        sh:maxCount 1;
        sh:minInclusive "0"^^xsd:float ;
        sh:maxInclusive "50"^^xsd:float ;
    ] .
```

Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/560 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 7 September 2025 22:26:47 UTC