Overwriting edge weight with a formulae - formula

I have nodes that have nodeweight and edges that have a edgeweight.
I would like to overwrite edgeweight with a formulae edgeweight=(nodeweight * old_edgeweight).
I think there should be some way by using console.
Is console the only way? What about any excel-like formulas?

You could export your edges as a spreadsheet (data laboratory -> Export spreadsheet), compute this new edgeweight in your favorite spreadsheet editor and then reimport edges again through the data lab.

Related

Visualisation for hierarchically clustered graph on map in python

I am starting a new project in python (to be used through jupyter-notebooks), where I'll need to visualise some hierarchically clustered graphs.
I have looked for existing packages, but so far I am not convinced by what I have seen.
I am not interested in the clustering process in itself, because this will be another part of the project and I know (roughly) how the graphs will be built up progressivelly.
What I am looking for are:
an appropriate data structure for storing hierarchically clustered graphs,
visualisation tools that would allow to represent the graph on a map (based on X and Y coordinates of the nodes) and either represent the subparts of the clusters, or simplify the clusters depending on their type or depth in the graph structure,
ideally, bring some interactivity, for example the ability to zoom-in or-out, or click on some clustered nodes to expand the nodes that were hidden in the cluster.
It looks pretty specific and despite some cool packages I have seen I am not sure which one would help without having too much to reimplement. So far, NetworkX looks like a cool starting point, especially with some D3.js (as shown here), but it is still far from what I have in mind.
Any advice about where to start digging?
Thanks a lot.
Gautier
For Python, Seaborn's clustermaps are nice. Seaborn is mainly meant to be used with Pandas dataframes; however, the documentation for clustermap says it can be rectangular data, and so I think it means other arrays will wor.
See also:
Dendrogram with heat map
SciPy Hierarchical Clustering and Dendrogram Tutorial
Hierarchical Clustering in Python

Automatic layout for directed acyclic k-partite graph

I have a directed, acylcic, k-partite graph which I want to layout in what seems the most intuitive way:
Each row of nodes corresponds to a partition, and they go with the flow of the graph.
The order of the nodes in each row is such that minimizes the number of crossing edges. Making the graph easier to read.
I would like to use cytoscape for this. Is this functionality already available? And if not, is it simple to program or is there some hack around it?
Here is an example of what I mean:
a
|\
v v
1 2
|
v
A
Yes ... a fairly straightforward thing.
I created a graph just like yours in Cytoscape, and used Style to set the edge attributes to show arrows (for convenience).
I then used the yFiles Hierarchical Layout and got exactly your picture.
Note that there is a Hierarchical Layout that comes under the Layout menu pre-installed with Cytoscape 3.6. THAT'S NOT THE LAYOUT I MEAN ... because it doesn't honor directed links.
To get the yFiles version, click the "Install yFiles" submenu under the Layout menu, and then install and use the yFiles layouts.

Extract data from libreoffice calc chart

I have a graph in Calc but not any data points for that chart. How can I extract a raw data in, say, CSV format or create a spreedsheet?
Thank You!!
If it's a simple picture, not a "real" chart, then you'll need a 3rd-party digitizing software; AFAIK there's no built-in feature to digitize plots in LO calc. There are some lists of digitizing tools online, for example http://connectedresearchers.com/graph-digitizer-comparison-16-ways-to-digitize-your-data/ . For a free, online tool, you may check the WebPlotDigitizer by Ankit Rohatgi.
If it's in fact a chart, and you're searching for the data, do the following:
Double-click on the chart; now, it should have a gray border:
Right-click inside that gray border to open the context menu; select the last entry "Data ranges":
The content of the "Data Range" field contains the address of the source data for the chart. The sheet name is followed by a ! sign and the field range:

Is there an interactive output device to view 3D graphs in R?

I'm currently generating 3D graphs in R using the persp-command. To change the viewpoint one has to set the parameters theta and phi. To evaluate (a good viewpoint on) the graph, one has to try lots of combinations for these parameters.
I was wondering if one can define an interactive output device that allows to rotate the graph using the mouse. It would be also nice if this device gives the current values for theta and phi.
Is there such a device/package?
See the rgl package: http://cran.r-project.org/web/packages/rgl/index.html
It won't report the theta and phi values you need, IIRC (though see #Dieter's comment below for a solution to this), but you can use rgl.snapshot() or rgl.postscript() to grab the current display as a bitmap or vector image. The package has persp3d() which is very similar to persp().
See the package rggobi http://cran.r-project.org/web/packages/rggobi/index.html
For data visualisation in 3 or even more dimensions, try the package rggobi which makes use of the program ggobi. It is possible to manipulate the data using the mouse, "brush" data, identify points in the data all while visualizing in a number of dimensions.

large graph data visualization with JDBC/ODBC

I have looked at Gephi and tried to play around with it, however it only supports MySQL, SQLServer, and postgreSQL. My database connectivity is JDBC/ODBC. What other graph visualization software would be able to connect to such database?
Graphviz is magnificent, it can handle enormously big data sets and draw graphs. But this is a standalone tool that draws graphs based on its own DSL, e.g.:
digraph G {
A->B;
A->C
}
So you would have to produce such a file first and then feed GraphViz with it.

Resources