benmaier / netwulf

Interactive visualization of networks based on Ulf Aslak's d3 web app.
MIT License
294 stars 26 forks source link

visualize(network) should let the user specify which node and edge attributes to use #2

Closed davhin closed 5 years ago

davhin commented 6 years ago

I have networks whose nodes may be grouped and therefore coloured differently according to several distinct node attributes. Likewise, my networks hold several different attributes inside one edge (total count, percentage) and I need to use either of them, depending on the situation, to layout the network.

I propose to allow the user to pass two strings to visualize, one to decide which node attribute to use as the denominator for groups, the other to specify which numerical edge attribute to use as the weight:

visualize(network, node_group='node_attr_1', edge_weight='edge_attr_2') as a specific example.

I will open a pull request to this end.

benmaier commented 6 years ago

I just thought: maybe it's better if this is done on the web app side -- include two drop down menus, in which the node attributes (edge attributes, respectively) are shown, inferred from the data, such that one can dynamically choose.

Nevertheless, the initial value of those menus can then be passed to the function visualize

For now it might suffice to add additional attributes though.

davhin commented 6 years ago

I had the same idea, but until that is implemented this could be a workaround. Also, if you know you are only interested in one specific combination this reduces JSON size, which may or may not be important depending on the resources consumed by the app.

benmaier commented 6 years ago

true!

On Oct 18, 2018, at 17:44, David notifications@github.com wrote:

I had the same idea, but until this is implemented this could be a workaround. Also, if you know you are only interested in one specific combination this reduces JSON size, which may or may not be important depending on the resources consumed by the app.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/benmaier/netwulf/issues/2#issuecomment-431059924, or mute the thread https://github.com/notifications/unsubscribe-auth/AKOzvOXmQOlDuJjMaM0WX7WU2bSnyTmNks5umKHzgaJpZM4XttxR.

benmaier commented 5 years ago

paging @ulfaslak here. This is not super important, but I agree it'd be a nice feature to scan node and link attributes from the uploaded network and then have two drop-down menus from which to choose the attribute name for node-color and link-width. What do you think? I say let's keep this in mind for later versions.

benmaier commented 5 years ago

we decided that for now, filtering/choosing is done on the python side