Network Analysis

litstudy.network.plot_network(g: Graph, *, height='1000px', smooth_edges=None, max_node_size=100, min_node_size=5, largest_component=True, interactive=True, controls=False, scale=1, iterations=1000, gravity=1, file_name='network.html')

Plot a networkx.Graph generated by one of the build_X_graph functions in this module. Plotting is done using the pyvis library.

Parameters:
  • height -- Height of the plot.

  • smooth_edges -- Enables curved ('smooth') edges. Looks nice but is heavy on performance.

  • min_node_size -- The radius of the smallest node.

  • max_node_size -- The radius of the largest node.

  • largest_component -- Only plot the largest connected component of the graph.

  • file_name -- The name of the file where the plot will be saved.

litstudy.network.build_citation_network(docs: DocumentSet, **kwargs) Graph

Builds a citation network: a directed graph where each node corresponds to a document and each directed edge indicates that one document cites the other.

litstudy.network.plot_citation_network(docs: DocumentSet, **kwargs)

Plot a citation network.

This is a shorthand for plot_network(build_citation_network(docs)).

litstudy.network.build_cocitation_network(docs: DocumentSet, *, max_edges=None, **kwargs) Graph

Builds a co-citation network: a undirected graph where each node corresponds to a document and the edge weights stores the cocitation strengths (i.e., the number of times two documents have been cited together).

Parameters:

max_edges -- Select only the top edges. This is useful since cocitation networks are often dense and only the strongest edges are usually important.

litstudy.network.plot_cocitation_network(docs: DocumentSet, *, max_edges=None, node_size=10, **kwargs)

Plot a citation network.

This is a shorthand for plot_network(build_cocitation_network(docs)).

litstudy.network.build_coupling_network(docs: DocumentSet, max_edges=1000, **kwargs) Graph

Builds a bibligraphic coupling network: an undirected graph where nodes indicate documents and edge weights store the bibliographic coupling strength. This strength measures how similar two documents view related work. It is measured as the number of shared references between two documents.

Parameters:

max_edges -- Select only the top edges. This is useful since these networks are often dense and only the strongest edges are usually important.

litstudy.network.plot_coupling_network(docs: DocumentSet, *, max_edges=None, node_size=10, **kwargs)

Plot a bibliographic coupling network.

This is a shorthand for plot_network(build_coupling_network(docs)).

litstudy.network.build_coauthor_network(docs: DocumentSet, *, max_authors=None) Graph

Builds a co-author network: an undirected graph where nodes indicate authors and edge weight indicate the number of shared publications between two authors.

Parameters:

max_authors -- Select only the top X authors.

litstudy.network.plot_coauthor_network(docs: DocumentSet, *, max_authors=None, **kwargs)

Plot a co-author network.

This is a shorthand for plot_network(build_coauthor_network(docs)).