Hi Steve, yes, you’re bang on the money with your insight - for now, just getting the vanilla x,y position is enough to get me through to the next stage.
My journey to get this far has taken a few different turns. I’m putting together an rdf graph-based toolkit that ingests data describing data models of varying levels, data transformation processes, and data equivalence mappings to support a range of use-cases.
One such use-case is the simple creation of entity-relationship models from data dictionaries. I’d written a wrapper around a python module called rdf2dot
that did roughly what I wanted, but in parallel, found a really useful javascript/d3-based graphing library called gravis that generates really nice interactive force-directed graph layouts.
These work really well for unstructured exploration and visualisation of raw and semi-curated rdf nodes and edges, with a fairly rich set of annotations that can be applied for styling and labelling.
But there’s very much a need for a series of more controlled, layered or hierarchical layouts, I was hoping to be able to leverage the graphviz layout engines for determining node-placement, then letting the gravis library render my scenes, while retaining some of the same styling and look-and-feel so as to present a single user-interface over web (flask server backend).
One feature of gravis I was going to misuse was the image-painting feature it has, which I was going to populate with rendered versions of the html-style tables that graphviz generates. I’ve switched between writing code to generate SVG objects based on tables and managed to generate half-decent foreignObject
’s populated with HTML tables, but styling is not stable for foreignObjects in SVG, at least, not when parsed (mangled!) through the disparate set of tooling at my disposal.
I’ve not arrived at a solution for that yet, one cludge could be to get dot to render the html for each table separately to say a .png, which I can attach to the interactive gravis graph definition - whilst also getting a good measure of its width, height attributes, which should match those in the more complete rendered layout.
Hope that’s not too tedious an explanation, the short answer is, I want to mix the best of the d3-style visualisation features (interactivity/click+drag etc), with those from graphiz (hierarchical layouts and tidy/stable HTML-style table renderings)
There’s probably more besides, but this outlines the general course I’m hoping to navigate in terms of my exploration/investigation.
Some images of test-visualisations I’ve put together to give an idea of what I’m trying to do:
-
A dot (rdf2dot
) generated visualisation of a git-style diff operation performed against two versions of the same data model:
-
A gravis rendered visualisation of the raw rdf underpinning the same datamodel with annotated selection
What I want to do is mix aspects of the rendering in 1. with some of the user-interface benefits of the rendering in 2 (which you can’t see here in this static image, but which include animated click-and-drag, pan and zoom, and individual node-focus, updating the information panel below the visualisation)