Files and interoperability#
Readers, writers and converters (ag.io); ag.read and ag.write pick the format from the extension.
By extension#
JSON#
Node-link dictionary of g (see the module docstring for the layout). |
|
Graph from a node-link dictionary (AryaGraph, networkx or d3 flavour). |
|
Node-link JSON text of g (UTF-8 friendly: non-ASCII characters are kept as is). |
|
Graph from node-link JSON text; see |
|
Write g as node-link JSON (UTF-8). |
|
Read a node-link JSON file written by AryaGraph, networkx or d3. |
Edge and adjacency lists#
Read an edge list: one edge per line, extra columns become edge attributes. |
|
Write g as a delimited edge list (CSV by default). |
|
Read an adjacency list: each line is a node followed by its neighbors (successors if directed). |
|
Write g as an adjacency list (networkx's |
GraphML#
Write g as a UTF-8 GraphML file. |
|
Read the first graph of a GraphML file. |
|
GraphML document for g as a string (see the module docstring). |
|
Graph from a GraphML document string; see |
GEXF#
Write g as a GEXF 1.3 file (UTF-8) for Gephi; see the module docstring for the mapping. |
|
Read a static GEXF graph (versions 1.1–1.3). |
DOT#
DOT text for g. |
|
Write |
|
Parse DOT text into a |
|
Read a DOT file; see |
|
Malformed DOT text; |
Mermaid#
Mermaid |
|
Parse a Mermaid flowchart (the subset described in the module docstring). |
|
Write |
|
Read a Mermaid flowchart file; see |
networkx, pandas, numpy and SciPy#
AryaGraph copy of a networkx graph (node, edge and graph attributes are copied shallowly). |
|
|
|
Graph from a DataFrame with one row per edge. |
|
Graph from a node table and/or an edge table (the inverse of |
|
|
|
Graph from a square adjacency matrix; every non-zero entry is an edge. |
|
Dense adjacency matrix |
|
Graph from a scipy sparse adjacency matrix (any format); same rules as |
|
Sparse adjacency matrix (a |