Hurray! Congrats! Please come back to us if anything pops us. Good luck with your project! -- Benjamin On Thu, 19 Sep 2019 at 02:57, Alain L'Hostis lhostis@users.sourceforge.net wrote: This is it, here comes my working solution. In my previous code there was a mistake in the naming of the property, I made a mistake in typing an 'U' instead of an 'u'. In the end, the code that works is here: ~~~ node_label = graph.getStringProperty("urbanAgglomeration") node_city_code = graph.getIntegerProperty("cityCode")...
Thanks a lot Alain. Ok, so this is a progress. My hunch is that your label property: node_label = graph.getStringProperty("UrbanAgglomeration") has never been populated If it is populated, when you print: for n in graph.getNodes(): print node_label[n] You should not have empty strings only. If so, this means that the property has never been stored. And probably it has not been created yet, because of the very first error you mention in this thread. To test if a property exist in a graph, you can...
(apologies, as I am replying by email, the formatting seems to have vanished in the process) -- Benjamin On Tue, 17 Sep 2019 at 11:59, brenoust falcoyote@users.sourceforge.net wrote: Dear Alain, There are a few issues in this thread. 1) about populating node/edge properties: Custom properties are not really the problem here, my question is more on the way you populate these information. There are many ways to do it, and I guess you are first reading through a file. Because in your first example,...
Dear Alain, There are a few issues in this thread. 1) about populating node/edge properties: Custom properties are not really the problem here, my question is more on the way you populate these information. There are many ways to do it, and I guess you are first reading through a file. Because in your first example, UrbanAgglomeration does not exist before you create it (but then it is empty and remains unpopulated). Imagine that you are reading through a rough object of the form: mygraph= {nodes:...
Yes indeed, Guy's code creates a new property, and copies the content of a new property into graph["OriNodeLabel"] which then becomes an empty string. My question is when you proposed, graph["OriNodeLabel"][n] = n.UrbanAgglomeration It seems that you are already reading some data. Were/how is this data stored? You were probably confusing between two version of n, n being a Tulip node, and n being your own data structure. Tulip nodes are their own structure (basically a fancy integer as a node id),...
Thanks a lot Pascal for the kind words. I'm very happy we could be of help. If you have any further issue, please do not hesitate to contact us (through Github, easier to track and does not mess with my email fonts :). I hope you will enjoy all the fun of the tulip API! -- Benjamin On Fri, 28 Jun 2019 at 22:47, Pascal elastika@users.sourceforge.net wrote: I really appreciate your time Benjamin, your example is very helpfull, many thanks. You are right, Tulip approach is different but the library...
Hi Pascal, I feel a bit of frustration over our documentation in your message. We are very sorry, this is a new feature of the Python API here, so the doc may not be fully explicit. And the feature may be improved to a more pythonic way in the future (please do not hesitate to PR if you wish to contribute). A basic example of the feature is: tlp.selectShortestPaths(graph, tlp.node(1), tlp.node(2), tlp.AllPaths, graph['viewMetric'], graph['viewSelection']) The first argument is the graph in which...
Hi Pascal, You may refer to the github post here: https://github.com/Tulip-Dev/tulip/issues/39#issuecomment-451337822 Best, Benjamin On Fri, 28 Jun 2019 at 03:59, Pascal elastika@users.sourceforge.net wrote: Hi! I have upgraded to version 5.3 and now selectShortestPaths is recognised, great. Unfortunately, did'nt find many Python demo. Can someone kindly provide an example showing selectShortestPaths basic usage? For instance, given a directed weighted graph such as wedges =[[1,2, 3.2], [2,3, 4.2],...