Community Portal

Flow diagrams - Improving the flow diagram builder

CityLoops
Back to topic list

After discussing the use of flow diagrams in CityLoops, their use is now in full swing and first results can be seen: https://cityloops.metabolismofcities.org/flowdiagrams/ . Check out the FDs of dairy products or fish, for example.

Now that the FD builder is used, we are seeing how complex a material's connections can be, how practical the use of the tool is (or isn't) and how small the diagrams become. For the latter, we can implement a full screen view, as was already discussed with Guus.
But, another issue that was raised, by Carla, is that there is no possibility to create a "one to many" relationship, i.e. one origin to several destinations, at once or in one go, which would be more practical. Instead, the single origin-destination connections have to be build one by one.
Before making a task for this, I wanted to discuss here if (1) this is technically possible and (2) if that makes sense from an editing perspective or table view, because the single connections still have to be displayed in the end. @Paul and Aris, what do you think?


It's great to see this in use! Quick question though: when you say it's not possible to create "one to many" relationships, what exactly do you refer to? Can you give me an example of something that can't be done at the moment?


Yeah, I could have made that more clear. It is more about HOW the user can add them and not so much WHAT. It is possible to create those relationships, but the idea was that a user can select an origin and then instead of only selecting a single destination from the dropdown list, they can select multiple in one go, before hitting save. See image as example, where the orange arrow options could also be selected at the same time, in this case creating a one to 3 relationship at once. Is that possible? Does it make sense? I also don't know. Carla thought it was more user friendly, maybe it is.


Trying to make the same as the topic tags of the layer 1 (where you can update a document that has the same information for 2 diferent topics) - you can tag more than 1 topic - the idea is to make the same for the flow diagram nace codes, when you introduce origins or destination (possibly 'tag' more than an origin or destination).


Got it, thanks.

In the back-end, this is possible - I can set it up so that it saves is properly. However we'd need to think about front-end. Firstly, what about the label? If you select 3 items, would you then get 3 new fields for label? There may be a clever way to set this up. But if it isn't done cleverly, then this will create more confusion which may not outweigh the time savings. However, I'm gonna let that be Guus' problem to figure out, so if you all can sort out front-end, then I can tell you that yes in the back-end we can make it work. HOWEVER, I think when editing items what we should leave things as they are, that you item them one by one. Otherwise things get very complex very quickly, and I imagine there is not that much time to be saved there.


Good to know that it is possible 👍

  1. Label. At the moment, the cities don't really use that at all, but instead only the full 4-digit codes. I'm thinking that if someone wanted to add labels, they could do so when editing items. Should I check with Guus first, before you start work on back-end stuff?
  2. Editing. Yes, I agree. One by one should still be the way to go.
  3. What about sorting / grouping codes in the list below the diagram. At the moment, they are sorted in the order in which they have been added. There could be value in sorting them by code (too), both for the origin and destination column. What do you think? Is this also a matter for Guus?

  1. This particular target audience doesn't use labels, but for others they are quite relevant. So I'd suggest that we don't tailor it primarily to one audience in terms of convenience. A solution could be to have two "Add block" buttons... one that says "Add single item" which has the label fields (current page), and another one that says "Add multiple items" which will be the new page. How does that sound?
  2. OK
  3. Yeah sure that should be easy enough. Add it all to the same task and I'll think I'll do all of it, most of it is backend stuff anyways.

Hello,

Sorry for interrupt the discussion.
"Firstly, what about the label? If you select 3 items, would you then get 3 new fields for label?" - The idea is to have a "add destination button" similar when I upload more than one file. That means, that when add a destination there will be the option to add a destination NACE Code and a destination label as well.

At back-end this should allow to automatically create several relationships between the same origin and different destinations selected. And I thing the inverse could happen too (several origins to one destination)

At front-end you will geta more user friendly data input. Right now is very confuse and hard to introduce so many information. I send you in attach some examples of what front-end could looks like.

I hope that could help you to find the solution.
Best


Thanks a lot Carla! This does make sense. Carolin, it may be easiest if you discuss this with Guus. If he can make a sensible interface then I can make it functional. Having the label still present would be ideal, and in Carla's setup this is still the case. I'd prefer that (as long as Guus makes this actually display properly).


You're welcome Paul. We're here to help ;)


Thanks Carla and Paul for this. I will get started on the front-end 👍


@Paul I've pushed some changes to the flowdiagram-destinations branch. Each new destination and label have a different name. The select2 doesn't work yet but that shouldn't affect you.

At the moment it doesn't load the real data yet for the origins and destinations. Can you help with that?


OK thanks, I'll work on this later in the week.

Log in to join the conversation

Sign Up Log In