Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregations should separate "ALL" values #63

Open
zeginis opened this issue Dec 4, 2017 · 5 comments
Open

Aggregations should separate "ALL" values #63

zeginis opened this issue Dec 4, 2017 · 5 comments

Comments

@zeginis
Copy link
Contributor

zeginis commented Dec 4, 2017

e.g. the dataset_poverty has the dimension POPULATION_GROUP with values: CHILDREN, PENSIONERS, WORKING_AGE_ADULTS and ALL

When computing the aggregations the ALL value should not be used. Othewise the result will be incorrect.
E.g. the following SUM will be incorrect.

{dataset_poverty{
  observations(dimensions:{reference_period:"2010"}){
    aggregations{sum(measure:COUNT)}
}}}
@RickMoynihan
Copy link
Member

I think this is the expected behaviour.

The only way I can see to resolve this is to model the overlap of dimensions and target that.

Do you know of any vocabularies that do this?

@zeginis
Copy link
Contributor Author

zeginis commented Dec 8, 2017

In this case the aggregation is wrong since male+female=total. The aggregation will return 2*total

This is discussed at Challenge 9.3 of the application profile (https://islab-uom.github.io/qbBestPractices/#definingCodeLists). A solution could be to use a hierarchy and define total values at the top of the hierarchy, but this is still an open issue.

@RickMoynihan
Copy link
Member

Yes I understand the problem; it's just not really CubiQL's job to ensure you don't ask stupid questions and get stupid answers.

It's a modelling problem, which is why I'm wondering if there are any ontologies that let you describe MECE style properties of dimensions etc. If we can describe this stuff then we can in principle support it.

There are likely other similar issues such as letting people sum ratio's etc...

@zeginis
Copy link
Contributor Author

zeginis commented Dec 8, 2017

Another thing that came in my mind is the aggregation of hierarchical data.
In this case CubiQL should not mix all the hierarchical levels together.

@RickMoynihan
Copy link
Member

RickMoynihan commented Dec 8, 2017

Yes, that's another bad one. Again a modelling vocab/issue though. Are we planning to propose a vocabulary for representing these things? Feels like we need something like owl:disjointClass like an appprofile:disjointSummable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants