Skip to content

Instantly share code, notes, and snippets.

@fabiovalse
fabiovalse / README.md
Last active August 29, 2015 14:02
LOD CNR MI TUTORIAL - Clavius Example 2

The aim of this gist is to show how to handle the execution of simple SPARQL query over the DBpedia SPARQL endpoint using Javascript, JQuery and AJAX.

Christopher Clavius (25 March 1538 – 6 February 1612) was a German Jesuit mathematician and astronomer who was the main architect of the modern Gregorian calendar. In his last years he was probably the most respected astronomer in Europe and his textbooks were used for astronomical education for over fifty years in and even out of Europe.

The following code shows how to create a Google Maps containg the events occurred during the life of Clavius. On clicking the markers an infowindow opens showing the name of the event.

@fabiovalse
fabiovalse / README.md
Last active June 29, 2020 14:42
Points Along an Archimedean Spiral
@fabiovalse
fabiovalse / README.md
Last active July 3, 2021 14:05
Equidistant Points Along an Archimedean Spiral
@fabiovalse
fabiovalse / README.md
Last active August 29, 2015 14:02
Randomic World Cup 2014 Mood Map

This experiment wants to show the mood of each countries partecipating to the World Cup 2014. In this example the mood is a Randomic value between 0 and 100. Google Geo Chart was used for drawing the Earth Map.

@fabiovalse
fabiovalse / README.md
Last active September 17, 2018 08:04
DBpedia Ontology Tree

The tree shows the classes of the DBpedia Ontology.

Due to the size of the ontology tree, it is not possible to look at a complete overview. Even if zoom mechanism was introduced the overview would results confusing. Furthermore, the overlapping edges make difficult to read relationships between classes.

The Mike Bostock Cluster Dendogram has been used for constructing the visualization.

@fabiovalse
fabiovalse / README.md
Last active November 14, 2016 09:27
Collapsible DBpedia Ontology Tree

This visualisation shows the DBpedia Ontology using the Bostock Collapsible Tree.

Differently from the previous example (DBpedia Ontology Tree), there is no overview but the collapsible nodes allow an easy exploration of the ontology in an interactive way.

Gray nodes contains subclasses while white nodes are leaves.

@fabiovalse
fabiovalse / README.md
Last active November 8, 2019 07:16
Fixed DBpedia Ontology Tree (Colored)

This visualisation shows the DBpedia Ontology and it is based on this example.

Differently from the previous trees (Collapsible DBpedia Ontology Tree and DBpedia Ontoloy Tree) it presents a different layout in which the rows and columns, where the nodes are placed, are fixed.

It has a better layout than the DBpedia Ontoloy Tree example but it still worse than Collapsible DBpedia Ontology Tree in term of exploration.

The colored nodes described the most populated classes (Inside the brackets the number of instances for the corresponding class):

  • Person (1124402);
  • Place (754450);
@fabiovalse
fabiovalse / README.md
Last active May 17, 2016 15:26
DBpedia Ontology Sunburst

The Sunburst shows the Ontology of DBpedia. The ontology used is not the one published on the DBpedia web site because not updated. In order to reconstruct the ontology, we ran a recursive procedure, starting from owl:Thing (the root class of the DBpedia Ontology), that performs SPARQL queries for retrieving the children class of a certain class and their amount of entities. The SPARQL query used is the following:

SELECT ?subclass (COUNT(?entity) AS ?count) {
  ?subclass rdfs:subClassOf owl:Thing .
  ?entity a ?subclass .
}

This is only the first query executed in the recursive procedure. Then, the same query is executed for each owl:Thing child class substituting owl:Thing with the name of the child class.

@fabiovalse
fabiovalse / README.md
Last active April 27, 2016 09:20
Fixed DBpedia Ontology Tree (Colored) II

This visualisation is an extension of the Fixed DBpedia Ontology Tree (Colored). It includes the class size that is the amount of entities of a certain class.

For instance, considering the RouteOfTransportation node on the top of the tree, its value (27,027) represents the number of entities labeled with a subclass of RouteOfTransportation or RouteOfTransportation itself. Hence, this value does not represent the number of entities labeled only with RouteOfTransportation. It is the number of entities labeled with RouteOfTransportation and all the subclasses belonging to the RouteOfTransportation subtree.

These values are considered in the circle radius of the nodes of the tree. This allows to compare two classes using their node size.

As in the previous visualisation the most important and significative classes, Person, Organisation, Work, Place, Species and Event has been co

@fabiovalse
fabiovalse / README.md
Last active April 27, 2016 09:24
DBpedia Ontology Sunburst (No Instances)

This sunburst shows the hierarchical ontology of DBpedia 2014. The data used includes only the classes that have at least an instance. Hence, this visualization does not show the entire hierarchy but only a part of it. In particular, the classes for which an instance exists.

The complete ontology is shown here.