cdlib.readwrite.read_community_json

read_community_json(path)

Read community list from JSON file.

Parameters:path – input filename
Returns:a Clustering object
Example:
>>> import networkx as nx
>>> from cdlib import algorithms, readwrite
>>> g = nx.karate_club_graph()
>>> coms = algorithms.louvain(g)
>>> readwrite.write_community_json(coms, "communities.json")
>>> readwrite.read_community_json(coms, "communities.json")