Hi,

I am looking for a method to visualize node relationships with Backdrop. The use case would be something similar to an orgchart respectively a simple genealogy tree. A couple of thousend nodes, interconnected with relationships.

In the (legacy) Drupal world, I'd probably try Graph API (https://www.drupal.org/project/graphapi) in combination with D3 (https://www.drupal.org/project/d3) or The JIT (https://www.drupal.org/project/thejit). Graph API provides Views integration, so I'd need that.

As far as I understand the requirements, the preferred Drupal (D7) approach would be to base the data model on the Relation module (https://www.drupal.org/project/relation) which creates relations as fieldable entities. This is nice in theory, but not so great in reality as - at least in the D7 world - there is not much UI available to manage and maintain these complex entities.

Interestingly, Graph API and D3 do not necessarily require the Relation module. It appears to work as well with Entity Reference (7.x-1.5),  as with References (7.x-2.4), and Node Reference (7.x-2.4), at least to some degree (tried that on a D7 site, I get graphs, though no usable hyperlinks in the graph). At this point, Backdrop could provide the foundation for what I am looking for as according to https://backdropcms.org/project/entityreference, Entity Reference is now a core module.

That leaves the visualization layer. If I have searched correctly, Backdrop has neither Graph API nor D3 ported. Is there something else I have missed, or maybe a different approach than we are used to from D7?

Thank you!

Most helpful answers

Hi asb. This sounds like a fascinating project.

I see that someone has ported D3 to Backdrop, but there is no release of the module yet. I'm not sure if it's functional. 

I don't see GraphAPI ported. BTW you can always search https://github.com/backdrop-contrib , which is the repo where all Backdrop CSM contrib modules are located. 

Another resource: https://github.com/backdrop-ops/contrib/issues . This issue queue contains port requests. People often post there either asking for help in porting, or letting the community know of an available port or port in progress.

It'd be great to have you as a contributor to the community. You can read how to contribute here.

 

Comments

Hi asb. This sounds like a fascinating project.

I see that someone has ported D3 to Backdrop, but there is no release of the module yet. I'm not sure if it's functional. 

I don't see GraphAPI ported. BTW you can always search https://github.com/backdrop-contrib , which is the repo where all Backdrop CSM contrib modules are located. 

Another resource: https://github.com/backdrop-ops/contrib/issues . This issue queue contains port requests. People often post there either asking for help in porting, or letting the community know of an available port or port in progress.

It'd be great to have you as a contributor to the community. You can read how to contribute here.

 

Hi argiepiano, thank your for your pointer to Github. I did not to look there and just checked over here where the "Modules for Backdrop CMS" are listed. Though, Graph API might still be needed to filter the data.

To give you an idea what I have in mind, something like this https://intelligence.weforum.org/topics/a1Gb0000001SH21EAG , just with other data sets and a different behaviour.

I will keep watching Backdrop and hope that at some point it will match something I need to do (started to use Drupal about 19 years ago, and its now end of the line).

Very cool! I'm sure GraphAPI can be ported.

Olafski's picture

We used Views and JSON via the Headless module for a visualization on the home page of https://fortext.net. The Vega graphic shows and links to related content ('Verwandte Beiträge') of different categories. (To see the data structure, click "Open in VEGA editor" in the context menu of the graphic.)

Disclaimer: I built the website but not the integration. For the latter, there is however a repository, in case you want to have a look: https://github.com/forTEXT/vega-fortext

This is an impressive website. Clean layout, blazing fast loading times, and and an interactive edge bundling visualization as eye candy. Beautiful, and looks like a low of work went into it. Also a fascinating showcase for Backdrop.

I looked quickly at Vega, which appears to be a sibling of D3. The examples shown at https://vega.github.io/vega/examples/ make my mind blow… endless possibilities for coders who can deal with that integration sorcery.

To figure out what is possible and what not, I built a prototype with a sample data set (~6,000 nodes; about 10% of the expected data). Theoretically, we could build the site on D7 and later move to Backdrop as the site building stage requires different functionality than 'regular operation' later.

In the site building phase, we need the following modules from contrib:

feeds,
feedspreview,
feeds_tamper,
node_clone,
node_convert,
remove_duplicates [and/or node_compare],
taxonomy_manager [and/or term_merge].

'remove_duplicates' is a key module to cleanup duplicates from various data imports, but it is unavailable for Backdrop. So for the site building phase, it needs to be D7. Otherwise we'd drown in duplicates. Or we'd have to figure out a completely different approach to "sanitize" data.

For the site functionality, essential modules from contrib are:

auto_entitylabel,
d3,
date,
entity,
entityreference,
entityreference_prepopulate,
eva,
field_collection,
field_table,
field_group,
field_group_table,
graphapi,
partial_date,
references_dialog,
serial,
synonyms,
views,
views_bulk_operations.

Except for graphapi and d3, several of these essential modules are not available for Backdrop, so for a Backdrop version quite some things would have to be changed (as well the editing workflow as the data presentation). This might or might not be feasible, so 'we cross that bridge when we come to it'.

However, the showstopper is that even in D7 graphapi and d3 seem not to  be capable to do what the site would need - map more than one entity reference onto the same force directed visualization. It works fine with one views relationship on one entity reference field. But as soon as I add a second views relationship, the visualization becomes garbled. I am not sure if this is a limitation of graphapi or the d3 module (or maybe something I am doing wrong); at least judging from the examples shown by D3.js, the library is not the problem and the D7 module "just" implements a fraction of the functionality.

So this is a bit sobering. The challenge would not only be to get this project operational in Backdrop or to migrate a D7 site to Backdrop, but it would not even work within the hypertrophied one-solution-to-everything D7 ecosystem as it currently is.