0

I am looking for steps or code for ontology visualization to get clear numbers for individuals by each class on a tree or a bar chart. I can convert the ontology file into another format such as xml. Just need help for how to do, many thanks!

It can be an expandable tree, or a bar chart, showing the numbers or percentages for each class or subclass.

Joanne
  • 13
  • 5

1 Answers1

0

What you can do is write a SPARQL aggregation query that will give you, for each type present in your dataset, the number of individuals. Turning this table into a chart can be done using a number of things, such as a spreadsheet software.

SELECT ?type (COUNT(DISTINCT ?individual) AS ?count) WHERE {
  ?individual rdf:type ?type
}
GROUP BY ?type
ORDER BY DESC(?count)
Richard-Degenne
  • 2,892
  • 2
  • 26
  • 43