An edge list represents a graph as an array of edges, with each entry recording a connected pair of nodes. It provides a simple format for converting raw relationship data into graph-processing or GNN inputs. section 8.3 section 8.3.2
Use an edge list in a practical graph-data pipeline:
- Extract relationship data from JSON or other raw sources and transform it into node and edge records that satisfy the graph schema. section 8.3.2
- Write each connected node pair to a text or CSV file, commonly alongside an adjacency list. section 8.3.2
- Load the serialized representation into NetworkX for exploration and visualization, or into PyTorch Geometric for preprocessing. section 8.3.2
Creating an edge-list file
A relationship dictionary can be traversed by source node and destination node. For each connection, the implementation writes a space-separated pair such as “source destination” and records the pair so an undirected edge is not emitted twice. section 8.3.2
Figure 8.9 A graph with nodes and edges marked (top). An edge list representation (middle); each entry contains the edge number and the pair of nodes connected. An adjacency list representation in a dictionary (bottom); each key is a node, and the values are its adjacent nodes.
Compare the graph itself with its edge-list representation: each entry shows the pair of nodes connected by an edge. section 8.3.2
