Import DyNetML into Python, NetworkX, and igraph — dynetml2other 0.1 documentation

# Import DyNetML into Python, NetworkX, and igraph

dynetml2other provides an importer and a set of wrapper classes for DyNetML files that allow them to be used with several Python graph libraries. Thes wrapper classes also support exporting data in DyNetML format, meaning that it can be created, used with this package, and then save out for analysis with other tools.

The principle helper class is the dynetml2other method:

Imports a DyNetML file into a wrapper class that uses NetworkX, igraph, or Python dictionaries to contain the networks.

`dynetml2other.` `main`(dynetml_path, network_format='dict')

  Parameters: | dynetml_path (str|unicode) – Path to a dynetml file network_format (str|unicode) – The network format; we expect “networkx”, “igraph”, or nothing (“dict”)
  Returns: | The data wrapped in the appropriate class and stored in the specified graph library
  Return type: | DynamicMetaNetwork|MetaNetwork|None

If the file contains a meta-network, it will be parsed into an instance of MetaNetwork, which stores graph data in dictionaries, or into one of its SubClasses:

> - MetaNetworkNX, which stores graph data in networkx.Graphs and networkx.DiGraphs
> - MetaNetworkIG, which stores graph data in igraph.Graphs

MetaNetwork itself contains no graph data, so if you use the base instance you will lose any graph edges.

If the file contains a dynamic meta-network, it will be parsed into a instance of DynamicMetaNetwork, which contains a list of one of the MetaNetwork SubClasses.

# Contents

- DynamicMetaNetwork
- MetaNetwork
- MetaNetworkNetworkX
- MetaNetworkIGraph
- dynetmlparsingutilities

# Indices and tables

- Index
- Module Index
- Search Page