graspologic icon indicating copy to clipboard operation
graspologic copied to clipboard

Tutorial / Examples for automatic layouts

Open daxpryce opened this issue 5 years ago • 17 comments

A jupyter notebook tutorial for automatic layouts would be super useful, along with the graphs rendered.

daxpryce avatar Dec 21 '20 20:12 daxpryce

Can i work on this?

rajpratyush avatar Jan 25 '21 15:01 rajpratyush

Hi @rajpratyush - in general, I think yes (correct me if wrong @dwaynepryce) but I saw you were also interested in #586 and #625. I would recommend working on those other two before this one, because this will be a lot more work, and would require 1. you learning the automatic layout tools in the library and 2. us deciding what dataset(s) we would want to showcase for the automatic layouts tutorial.

bdpedigo avatar Jan 25 '21 18:01 bdpedigo

Happy to discuss more if you are interested and want to get familiar with these tools!

bdpedigo avatar Jan 25 '21 18:01 bdpedigo

Calling these functions is super easy - the big question is what graph shows us a good, reasonable layout.

An example used in other layout algorithms is an edge list based on a Yeast genome dataset (the link in the openord README is no longer valid, but they did commit the yeast edge list to https://raw.githubusercontent.com/SciTechStrategies/OpenOrd/master/examples/serial/yeast.sim so we could probably use that at as well).

All I did was download that file, replaced \t with ,, then ran python -m graspologic.layouts n2vumap --edge_list yeast.sim --image_file yeast.png to get yeast

Which is at least fairly visually appealing.

Better than this simple example of using it via the command line would be also using it via library code and turning the edges back on between nodes and trying to find an opacity that also looks pretty good. You could then use the show_graph function in graspologic.layouts.render to display them in the Jupyter notebook and play around with some things like maybe updating the colors from being partition based to some sort of sequential colors based on degree centrality or something.

There's a lot of opportunity for playing around with this, if you're interested!

daxpryce avatar Jan 25 '21 21:01 daxpryce

sure @bdpedigo i will work on other so two so that i get familiar with the codebase before moving ahead with higher order problems

rajpratyush avatar Jan 26 '21 03:01 rajpratyush

@bdpedigo Can you guide on how to start with this issue now??

rajpratyush avatar Feb 08 '21 14:02 rajpratyush

I'm going to defer to @dwaynepryce on whether we know what we want for this tutorial to the extent that you could run with it?

bdpedigo avatar Feb 08 '21 15:02 bdpedigo

sure @bdpedigo

rajpratyush avatar Feb 08 '21 16:02 rajpratyush

I am interested and have started looking at codebase and notes

dfrancisco1998 avatar Mar 19 '21 18:03 dfrancisco1998

@dfrancisco1998 - make sure you message @bryantower with all of your questions. His implementation was the original one (when I merged, I squashed everything and all of his commits were lost, but trust me when I say he is the progenitor of this approach and most questions should go directly to him.) If there are questions about the color scheme generation or partition generation process, hit me up and I'll be glad to help.

daxpryce avatar Mar 23 '21 17:03 daxpryce

@bryantower actually, if you have any publicly available data that shows off the auto layout process from beginning to end, that may be a good place to start

daxpryce avatar Mar 23 '21 18:03 daxpryce

@dwaynepryce I am trying to use git to upload the layouts tutorial and the file is too large. Do you happen to have a smaller graph csv?

dfrancisco1998 avatar Apr 14 '21 17:04 dfrancisco1998

thoughts on just finding something interesting/moderately sized in http://konect.cc/ ?

bdpedigo avatar Apr 14 '21 17:04 bdpedigo

@bdpedigo I did but i was having a hard time understanding how the data was laid out (despite reading the readme within the .tar) I can bring those questions to office hours tomorrow

dfrancisco1998 avatar Apr 14 '21 17:04 dfrancisco1998

it looks like tab separated value edgelist from the one example I looked like, e.g., source \tab target \tab weight \newline

bdpedigo avatar Apr 14 '21 17:04 bdpedigo

@bdpedigo hm, which one were you looking at?

dfrancisco1998 avatar Apr 14 '21 17:04 dfrancisco1998

karate club i think i could be wrong, that's just what i assumed they meant by tsv

bdpedigo avatar Apr 14 '21 18:04 bdpedigo