NetstatsDriver

This driver extracts nodes and edges from the database that are required for the operations defined in the netstats module.

NetstatsDriver.graph_union(networks=None)

Returns a subgraph (edge list with source, target, network and weight) that contains all nodes present in all networks. If network names are specified as a list, all nodes present in these two networks are returned.

  • networks: List of network names

NetstatsDriver.graph_intersection(networks=None, weight=True, fraction=None)

Returns a subgraph (edge list with source, target, network and weight) that contains all nodes present in both specified networks. If no networks are specified, the function returns only nodes that are connected to all networks.

  • networks: List of network names
  • weight: If false, the intersection includes edges with matching partners but different weights
  • fraction: If specified, fraction of networks that the intersecting node should be in

NetstatsDriver.graph_difference(networks=None, weight=True)

Returns a subgraph (edge list with source, target, network and weight) that contains all nodes only present in one of the selected networks. If no networks are specified, returns all edges that are unique across multiple networks.

  • networks: List of network names
  • weight: If false, the intersection includes edges with matching partners but different weights