Converters#
Converters from various data structures to hiveplotlib-ready structures.
- hiveplotlib.converters.networkx_to_nodes_edges(graph: Graph, unique_id_name: str = 'unique_id', check_uniqueness: bool = True) tuple[NodeCollection, Edges]#
Take a
networkxgraph and returnhiveplotlib-friendly data structures.Specifically, returns a
NodeCollectioninstance of node data and anEdgesinstance of edge data. These outputs can be fed directly intoHivePlot().- Parameters:
graph –
networkxgraph.unique_id_name – name to use for unique IDs.
check_uniqueness – whether or not to check that provided
Nodeinstances have unique IDs.
- Returns:
listofNodeinstances,(n, 2)np.ndarrayof edges.