Questions tagged [edge-list]

Use [edge-list] for questions about creating, converting, or working in general with a list of edge nodes/vertices from a spatial network or graph. Be sure to include what language you are working with, e.g. [r].

An edge list is a list of edge nodes or vertices formatted in a tabular, graph, or other ordered layout. Sometimes referred to as an adjacency list or node list, an edge list contains all the points of a spacial network, commonly called a graph or map.

Edge lists in programming are used in R, Wolfram, and MATLAB, among others, and more broadly in computer science and mathematics in the specific fields of sorting/searching algorithms or graph traversal.

For further reading, see these links:

78 questions
1
vote
0 answers

How do I turn a string of words into an edgelist?

I am new to R and I am trying to create an edgelist using two variables. The first is a an ID number, the second is a short bio of words. I would like to separate the words, but keep them associated with the same ID number. Then I'd like to change…
lwe
  • 49
  • 5
1
vote
0 answers

Forcing straight AND orthogonal edges with dot

I have a program that automatically generates dot graphs representing the structure of a system. The system is defined by the user using a set of equations. I would like to force dot displaying only straight and orthogonal edges between nodes. The…
mroavi
  • 109
  • 2
  • 7
1
vote
1 answer

How to calculate path/diameter of edge attributes in igraph?

Here's an example of a data frame you can convert to an edgelist and then into a graph. Notice that I have added 'km' as an attribute to the edgelist. I'm not sure how to add 'km' as an edge attribute (so the distance between two nodes), but pretend…
hmnoidk
  • 441
  • 6
  • 13
1
vote
2 answers

merge edgelists to a single graph

I have three edgelists that have same nodes. I want to merge them into one graph and seperate these edges by colors and weights. I have provide small example of what I want to do: df1 a b 1 blue b c 0.361973313 blue a d 0.343729742…
minoo
  • 451
  • 4
  • 18
1
vote
1 answer

How to calculate the number of edges between nodes of a certain group?

I have the following dataset and the following script: library(GGally) library(ggnet) library(network) library(sna) library(ggplot2) # edgelist e <- data.frame(sender = c(1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5), receiver = c(2, 3,…
feder80
  • 957
  • 2
  • 10
  • 26
1
vote
0 answers

EdgeStyle on a LayeredGraphPlot

I'm using the LayeredGraphPlot function of Mathematica, and I would like to customize my edges and vertex using EdgeStyle and VertexStyle. But these two functions don't exist for a LayeredGraphPlot. In fact I have a list of weight for the edges, and…
Alexis Rosuel
  • 403
  • 1
  • 4
  • 8
1
vote
0 answers

Labelling multiple edges in d3.js

I would like to label multiple edges between two nodes in a d3 force diagram. By modifying this example (http://jsfiddle.net/7HZcR/3/) I have two edges displayed separately but the labels associated to the edges overlapping on one edge rather than…
Gerrard
  • 61
  • 4
1
vote
1 answer

How can I add a second new edge between two nodes update the old one

What I have: a multigraph H in networkX. Two nodes '0' and '1'. An existing edge e1=(0,1). What I want: add a second new edge e2 between nodes 0 and 1. PROBLEM: When I add the new edge e2 between 0 and 1, e1 is updated whit the new value…
Stefano C.
  • 833
  • 3
  • 11
  • 17
1
vote
1 answer

Similarity as edge attribute in iGraph

Lets say we have some graph g and then we compute some similarity between each pair of nodes from g: g <- graph.ring(10) g_sim <- similarity.dice(g) The question is: how to use data from g_sim to assign weights to the edges from g? In other words:…
1
vote
1 answer

how to make linked data/edgelist in R

List data "lt" is below. [[1]] "f24j" "mirror" "heliostat" "reflect" "photo" "solar" "sun" [[2]] "imag" "radiation" "sens" "detect" [[3]] "mesur" "chas" "captur" ... I…
1
vote
4 answers

Edges from matching column values in R

I would like to create an edge from matching column values in a table, so basically: V1 V2 V3 A 1 1 0 B 1 0 1 C 0 1 1 D 1 0 1 if I had a table like so, then I would like to make an edge list where A - B A - D A - C B -…
Snowy
  • 39
  • 6
1
vote
2 answers

iGraph Python, convert edge list to tuple and add.edges

I have a Graph G1 with 50 nodes and 100 edges. All edges are weighted. I have created a list of edges (sorted by a pre-defined order, removing specific edges with large values), and they are indexed like: Edgelist: [75, 35, 32, 1, ...] I want to…
user2524828
  • 171
  • 1
  • 1
  • 14
1
vote
1 answer

R igraph write.graph() edgelist if graph is empty

Using in R the package 'igraph' and calling the function: graph <- graph.empty(10,directed=FALSE) write.graph(graph,"some/path/graph.txt",format="edgelist") If I recall the graph by using g <-…
Axel Axel
  • 65
  • 1
  • 6
0
votes
0 answers

Mathematical operations (dividing and correlation) on two Pandas dataframe columns from different files

We are currently trying to set up a graph network analysing Youtube videos and dividing resp. correlating their metrics. However, we can't manage to read out two columns from two different files in order to divide them by each other or calculate…
kevko92
  • 11
  • 3
0
votes
0 answers

Train test split of a edgelist

I have a bipartite graph edgelist. Why is it that when I split the graph into 60% of items that should be in the edgelist, the train set becomes smaller than the test set. Should I go ahead and train the way it is
Hkneer
  • 11
  • 1