Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tree-based contribution analysis #30

Open
7 tasks
cmutel opened this issue Jun 27, 2024 · 2 comments
Open
7 tasks

Add tree-based contribution analysis #30

cmutel opened this issue Jun 27, 2024 · 2 comments
Assignees

Comments

@cmutel
Copy link

cmutel commented Jun 27, 2024

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
@marc-vdm
Copy link

Hi Chris,

I built something somewhat similar to this ~year back, see this PR, which may be some useful reference for you
LCA-ActivityBrowser#1046

I also used graph traversal to calculate these impacts. Happy to have a quick chat if it helps.

I do have some vague ideas for a more generalized graph traversal as well, that could be interesting to implement in BW at some point.

@cmutel
Copy link
Author

cmutel commented Jun 28, 2024

Thanks @marc-vdm. We will check this out, and of course would be happy to get your feedback once we have an alpha.

@will7200 will7200 self-assigned this Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants