SpaceAppsXploration / rdfendpoints

DEPRECATED, see semantic-data-chronos
https://github.com/SpaceAppsXploration/semantic-data-chronos
Apache License 2.0
2 stars 1 forks source link

Start experimenting with Data-Viz #29

Open Mec-iS opened 9 years ago

Mec-iS commented 9 years ago

We have different options to visualize the Graph.

WebResource and Indexer are not yet dumped in the Shard (see #23). When they will be in the Shard, there will be these Entities:

They are all linked through custom properties: <chronos:webresource> <chronos:relConcept> <chronos:concept> WebResource relConcept Concept And also for example: <solarsystem:Sun> <chronos:relConcept> <http://taxonomy.projectchronos.eu/space/dbpediadocs/sun> Note: the object in this triple is not triplified yet. See #28

All this data can be dumped, using RDF-lib as:

And visualized with:

Mec-iS commented 9 years ago

Note from @mr-niels-christensen about slicing nodes with RDF-lib:

There's no need to use SPARQL for queries like that. You have several ways of writing it directly with rdflib: A. Just use Graph.subjects() and Graph.objects() ... this gives you the first level, to get the second level, you'll need an extra loop. B. As above but use slices if you prefer, e.g. my_graph[my_node], see https://rdflib.readthedocs.org/en/latest/utilities.html#slicing-graphs C. If you know all the predicates you'd like to follow, you can use SPARQL property paths: http://www.w3.org/TR/sparql11-property-paths/ using these operators in Python: https://rdflib.readthedocs.org/en/latest/apidocs/rdflib.html#module-rdflib.paths So drawback of C is you have to list the predicates (there's no wildcard) while A and B both require a loop. Personally, I'd prefer any of the 3 to doing everything in SPARQL, but that's just a subject opinion.

mr-niels-christensen commented 9 years ago

To generate DOT from a Graph, try

https://github.com/mr-niels-christensen/rdflib-dot-serializer-plugin