linkedpipes / visualizations

LinkedPipes Visualization offers vocabulary based Linked Data visualizations
https://visualization.linkedpipes.com
GNU General Public License v2.0
1 stars 0 forks source link

Question: How does Concept visualizer treat polyhierarchies? #55

Open jindrichmynarz opened 8 years ago

jindrichmynarz commented 8 years ago

When you have a poly-hierarchical skos:ConceptScheme (i.e. a concept can have more than 1 broader concept), then it seems that the Concept visualizer duplicates the hierarchy's branches for each concept with multiple broader concepts. For example, I have a poly-hierarchical code list of pension kinds, which is visualized in this way:

pension_kinds_2008_used_in_data

For instance, in this concept scheme "Vdovské důchody vyplácené v souběhu s přímým důchodem" has multiple broader concepts, so its branch is duplicated.

Since poly-hierarchical concept schemes cannot be coerced into a tree with single root, it is not possible to visualize them easily. I think it would be acceptable if LP-VIS shows an error if provided with a poly-hierarchical skos:ConceptScheme.

Testing if data contains polyhierarchies can be done using this SPARQL query:

PREFIX skos:     <http://www.w3.org/2004/02/skos/core#>

ASK
WHERE {
  {
    SELECT ?narrower 
    WHERE {
      {
        ?broader skos:narrower|skos:narrowerTransitive ?narrower .
      } UNION {
        ?narrower skos:broader|skos:broaderTransitive ?broader .
      }
    }
    GROUP BY ?narrower 
    HAVING (COUNT(DISTINCT ?broader) > 1)
  }
}