Skip to content

Add tree-based contribution analysis #30

Open
@cmutel

Description

@cmutel

Feature request

One can currently see the impact of different processes in the supply chain via a bar chart:

Screenshot 2024-06-27 at 22 18 51

And via a Sankey graph:

Screenshot 2024-06-27 at 22 25 15

Our client would like to have a more interactive contribution analysis based on an expanding tree. This would follow the standard "clickable triangle" pattern where clicking on the triangle expands impacts. The basic interface would look something like this:

Reference flow: [dropdown]
Impact indicator: [dropdown]
Tag system: [dropdown]

┐ Reference flow
├─ Input A
├─ Input B
└─ Input C

Where Input A, etc., could be clicked to expand or contract.

To calculate the initial set of impacts, run graph traversal in the same way as the Sankey example. This graph traversal object should be kept in memory, so that further calculations can be done quickly. The initial calculation should use a shallow max_depth, either 1 or 2, and subsequent calculations (upon clicks) should do the same thing, but starting from the clicked node as the new functional unit.

If a tag system is chosen, then inputs should be grouped, so one would instead see something like:

┐ Reference flow
├─ Tag A
├─ Tag B
└─ Input C

Specific tasks:

  • Create new NavigatorWidget class for contribution tree, and make it available in this row:
Screenshot 2024-06-27 at 23 23 44
  • Design decision on tags system. Tags are a part of our fundamental data schema, and are designed to be categorical (quantitative values would normally be a property).
  • Add ability to add tags to processes, either in the existing edit interface or in a new pop-up. This interface should autocomplete against existing tag systems already in the data; we might want to cache these on the Database object instead of scanning the whole database when doing any initial load.
  • Implemented aggregation algorithm by tags system to the results. Handle missing tags elegantly.
  • Write initial graph traversal logic in new NavigatorWidget` class
  • Write click event handling logic in NavigatorWidget class
  • User acceptance and change requests

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions