tapios / risk-networks

Code for risk networks: a blend of compartmental models, graphs, data assimilation and semi-supervised learning
Other
2 stars 2 forks source link

Lb/user base visu #93

Closed lubo93 closed 4 years ago

lubo93 commented 4 years ago

This PR complements the existing user base plotting routines and outputs edge and node lists with "subgraph" indicator properties that can be processed with Gephi.

Here is an example of the fractional and neighbor-based user base:

network_visu

Orange nodes indicate nodes that belong to the corresponding user base.

odunbar commented 4 years ago

These look cool! Thanks for this! I have 2 suggestions for the PR

1) Could you remove all the extra files you've added - in general if the user_base example file can produce the .gexf and .csv files etc we do not want them on the git. as people can generate their own. This also goes for some of the other files you've uploaded and seem unrelated? like the NYC epidemic simulator and the .txt files

I'd recommend this PR just have the updated user_base.py and plot_user_base.py.

2) is the grey here the full contact network? I am not sure about the features of gephi, but it would be nice if we could get the orange edges stood our a little more? Or, (I know i've mentioned this before ;) ) we have a graph with just the orange nodes/edges, and it's exterior neighbours. This would give a clearer picture as to the island 'interior'.

lubo93 commented 4 years ago

Ok, all extra files are removed.

I would also add the minor simulation files updates. This is just to make sure that the simulation parameters are also up-to-date again.

And yes, the grey network is the original graph and the red/orange nodes represent the user base. I made the nodes/edges of the original graph a bit more transparent.

neighbor

glwagner commented 4 years ago

The viz is awesome. It will be nice for later reference to mention which files created these images!

lubo93 commented 4 years ago

The viz is awesome. It will be nice for later reference to mention which files created these images!

Good point. The script "plot_user_base.py" generates "node indicator" and "edge indicator" lists. These lists contain attributes that enable us to identify nodes and edges that belong to a certain user base.

These two files are generated to be used as input files in Gephi: https://gephi.org/ I used the Fruchterman-Reingold graph layout, but other choices are also possible.

tapios commented 4 years ago

This looks great, @lubo93. Could you please add figures to the SI on Overleaf?

lubo93 commented 4 years ago

This looks great, @lubo93. Could you please add figures to the SI on Overleaf?

Ok, I added two examples (neighbor and fractional user base) in the SI (Fig. S3).

odunbar commented 4 years ago

Hi @lubo93 could you merge master into your branch and resolve conflicts we can close out the PR Thanks!