You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems reasonable! I also think this would make things more clear about how nodes in the edgelist are assigned metadata.
If they're strings, they're assigned to either:
a) a node with name which matches that string, or
b) no metadata
If they're 0 indexed integers, they're assigned to the value at the nodes array pointed to when treated as an index.
If they're 1 indexed integers, we treat the nodes array as "1 indexed" and they're assigned to the value at the nodes array pointed to when treated as an index.
I like the idea and there's really not much LOE here. In fact, on the python side, I think you could already do this.
I'm trying to think of whether there's a real usecase for supporting the dict behavior too.
Either way, this is easy to support and goes to the top of the todo this. (but will come out after putting out the released and then rolled back canvas upgrade 😬)
Just another proposal:
When we want to color the nodes by their metadata, we customize the
display
argument in the Web class.See the documentation: https://webwebpage.github.io/docs/examples/add_node_metadata_categorical.html
Here, the key
nodes
accepts adict
as its value. But it may make more sense to uselist
instead.In other words, the accepted value is suggested to be:
'nodes' : [ { 'id': 0, 'cooperativity' : 'high', 'alphabeticallity' : 0, }, { 'id': 1, 'cooperativity' : 'low', 'alphabeticallity' : 1, }, { 'id': 2, 'cooperativity' : 'medium', 'alphabeticallity' : 2, } ]
This enables the data object easier to talk with the native D3.js in JavaScript. Please feel free to disagree. It’s just my own feeling.
The text was updated successfully, but these errors were encountered: