Skip to content

linked-statistics/Data-Cube-Cookbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Data-Cube-Cookbook

This document should help producers of RDF Data Cube in deciding about how to model multi-dimensional data in RDF. It is written and maintained by people producing RDF Data Cubes.

Related Documents

Recipes

Measurements with no or invalid number

A common pattern in the real world is that there is an observation with a measurement that cannot be properly represented as a number. We have seen that multiple times, for example:

  • There is more than one measurement for a particular observation and it cannot be told which one is/was correct.
  • There was a measurement but the result is lost.
  • There was a measurement but for whatever reason it cannot be represented as a number.

In all those cases the data owner cannot give a proper number for the measurement. The question is how to handle that in RDF. Not providing a measure or providing more than one measure would violate the RDF Data Cube model, providing a string instead of a number would make validation and handling of the data very complex.

Fortunately there is a proper way to handle this using NaN as measure, which is a valid value for xsd:double, xsd:float but not for xsd:decimal:

BASE <http://example.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

<observation> <measure> "NaN"^^xsd:double .

This should pass as proper RDF in validators like riot.

In case the original value should still be part of an observation one can model it as a qb:AttributeProperty. All qb:AttributeProperty are optional in an observation.

About

Tips and best practice for Data Cube users

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published