Hi Jindřich,
On 01/10/15 09:53, Jindřich Mynarz wrote:
> I'm wondering what is the intended interpretation of cases in which you
> have a component specifying a measure (qb:MeasureProperty) attached to
> slice (qb:componentAttachment qb:Slice). Based on the Data Cube
> Vocabulary formalization in RDF I see this is possible. Moreover, the
> Payments Ontology that is based on the Data Cube Vocabulary defines
> payment:totalNetAmount and payment:totalGrossAmount measure properties
> that are attached to slices (payment:Payment is a qb:Slice) (see
>
https://data.gov.uk/resources/payments).
These examples are misleading, see below.
> Contrary to this
> interpretation, my understanding of component attachment on the slice
> level (based on reading the DCV specification) is that the value of the
> component is fixed for all observations included in the slice. Viewed in
> this way, all observation in a slice with attached measure would share
> the same measure value (which probably does not make much sense).
Correct, and indeed doesn't make much sense there.
> I'd like to learn how to interpret measures attached to slices and how
> much of it is formalized and described in the specification vs. being
> wishful thinking.
If the measure (qb:MeasureProperty) is a measure *in that cube* then
there is no point in attaching it to the slice, as you say.
However, it is often convenient to put aggregate information on a slice
*using other properties*. It would have been nice to formalize this in
the QB spec and there are various proposals that were around at the time
but it seemed too early and we lacked time to get it done.
What makes the Payments ontology confusing is that it provides some
convenience properties for such aggregate values (the ones you point
out, payment:totalNetAmount and payment:totalGrossAmount). That's fine
but it goes one step further and declares those as being of type
qb:MeasureProperty which is were the confusion begins!
Why does it do that?
If you look at the section of [1] on "Technical Note on Data Cubes"
under "Extensions and well-formedness" there is the explanation.
Normally a payments cube is a cube of expenditure lines where you might
aggregate up the lines to single payment amount in the slices. However,
sometimes people only wanted to publish the aggregate information and
not the more detailed breakdown. For that they would use a different
cube structure with a different DSD, as illustrated in that section.
So those two aggregation properties can be used in two roles.
On a normal expenditure cube they are not in the DSD, they are not
measures in the cubes, they are just convenient RDF properties for
recording aggregate information on slices.
On a summarized payments-only cube they are measures in the DSD and they
are used on observations, not on slices.
Whether this option to allow two different sorts of cubes, one projected
from the other, was a good one is hard to tell. The payments ontology
was developed before the Data Cube Vocabulary went through
standardization and before there was much experience around using it.
Dave
[1]
https://data.gov.uk/resources/payments