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

Dimension attribute: hierarchy/aggregation level #35

Open
jstcki opened this issue Sep 10, 2020 · 8 comments
Open

Dimension attribute: hierarchy/aggregation level #35

jstcki opened this issue Sep 10, 2020 · 8 comments
Assignees

Comments

@jstcki
Copy link

jstcki commented Sep 10, 2020

Not sure how this needs to be modeled properly, so it's predictable. Attaching a skos:broader to each dimension value probably will work, but how can a tool know that this hierarchy exists in the data in the first place?

Assuming we have flat data with mixed hierarchy levels like

geo value partOf aggregation
Schweiz 5.0 mean
Zürich 6.0 Schweiz
Bern 4.0 Schweiz

A tool might display it as

  • Schweiz 5.0 (mean)
    • Zürich 6.0
    • Bern 4.0
  • ...

… or just show values on level "Schweiz" etc.

Cf.

@ktk
Copy link
Member

ktk commented Sep 17, 2020

  • New property: "next in hierarchy"
    • points to a separate object, maybe a SHACL shape
    • this shape can use the same property again for the next

@jstcki
Copy link
Author

jstcki commented Sep 29, 2020

@ktk one thing that came up in discussion with Fabian: when a dimension is part of a hierarchy, how should the different levels it be linked to the observation?

Option A

Only link the lowest level instance to the observation (e.g. a municipality), and link from there to higher levels -> canton -> country etc.

This is probably more "pure" and manageable in terms of the data model. Less triples needed. But resolving to higher levels and flattening them to a table is up to the client, so the hierarchy "shape" needs to be known to avoid having to walk all observations. Querying and building filters is more complex.

Option B

Keep all relevant levels linked to an observation (i.e. more tabular structure). E.g. having a municipality, canton, country dimension on each observation. Instances of municipalities and cantons etc. could still be linked but consumers don't have to know or respect this. Easier to query/filter for clients because data is already tabular. Would potentially need a lot more triples.

@FabianCretton
Copy link

About Option B, where data is "duplicated" to facilitate querying, to be noted that this could be part of information "materialization", where the data model is A and B is "inferred" by a reasoner.

Because maintaining Option B would be very cumbersome (correct all the triples when the hierarchy evolves)

@ktk
Copy link
Member

ktk commented Oct 1, 2020

That will definitely be option A. The library can figure out how it's nested so it could potentially support the developer/user.

For plain SPARQL, you will have to understand how it is done and either use property paths or classic joins.

@FabianCretton
Copy link

@herrstucki please not that in the current RDF version of the RedLists, I did implement both, for testing purpose and as I was not sure yet. In the next version, as this was validated by Adrian yesterday, I will remove the direct triples (i.e remove option B and keep option A only)

ktk referenced this issue in zazuko/rdf-cube-schema-viz Nov 8, 2020
@jstcki
Copy link
Author

jstcki commented Feb 8, 2021

Closing because described in the README: https://github.com/zazuko/rdf-cube-schema-viz#nested-hierarchies

@jstcki jstcki closed this as completed Feb 8, 2021
@l00mi l00mi reopened this Sep 15, 2021
@l00mi
Copy link
Contributor

l00mi commented Sep 15, 2021

We will discuss further details on this topic in here. @Rdataflow

@martinmaillard
Copy link
Contributor

Just a note about the solution described in the README: I don't think it's valid to put sh:path on a sh:NodeShape (https://www.w3.org/TR/shacl/#syntax-rule-path-node).

@l00mi l00mi transferred this issue from zazuko/rdf-cube-schema-viz Dec 1, 2021
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

5 participants