Swirrl / pmd-rdf-validations

PMD Validations for cubes etc...
MIT License
3 stars 0 forks source link

Validate all observations for a particular measure share the same unit #5

Open RickMoynihan opened 5 years ago

RickMoynihan commented 5 years ago

Strictly this might not be a requirement but it's probably worth us adding a validation to ensure that users don't mix units in a dataset within a measureType.

e.g. in a dataset with one measure (counting people); we probably want to check that all counts are People (units) and that we don't mix People with something like People (thousands).

RickMoynihan commented 5 years ago

This was suggested by @RicSwirrl ... cc @Robsteranium to sanity check this is a good idea.

Robsteranium commented 3 years ago

We certainly don't want two observations with the same dimensions but different attributes. The cube IC-12 will take care of that.

Having consistent units per measure seems reasonable but I wonder if there are scenarios where the unit might depend on another dimension (than the measure-type). I can't seem to find it now but IIRC the ABI used to include counts of enterprises and employees. You could imagine modelling this with a single :count measure and a :statistical-population dimension which the measurement unit (and sdmxa:statUnit) would depend upon (instead of the measure).

That said, you could imagine this being a warning (for stuff like sdmxa:unitMult too as per the original example).