Bibliographic network¶
- class pysyrev.BibNetwork(bib_dataset=None)[source]¶
Bases:
objectNetwork analysis built from a BibDataset.
Two graph types are available:
- Bibliographic coupling — documents as nodes, linked when they share
common references. See build_coupling_network().
- Co-citation — references as nodes, linked when they appear together
in the reference list of at least one document. Resolved references that exist in the corpus are marked node_type=’internal’; unresolved external references are node_type=’external’. See build_cocitation_network().
Both graphs can coexist on the same BibNetwork instance.
Usage¶
net = BibNetwork(bib_dataset) net.build_coupling_network() net.build_cocitation_network() G_coupling = net.coupling_graph G_cocit = net.cocitation_graph
- build_coupling_network(use_resolved=True, use_unresolved=True, min_shared=1)[source]¶
Build (or rebuild) the bibliographic coupling graph.
- Parameters:
- Return type:
- property coupling_graph¶
- build_cocitation_network(use_resolved=True, use_unresolved=True, min_cocitations=1)[source]¶
Build (or rebuild) the co-citation graph.
- Parameters:
- Return type:
- property cocitation_graph¶
- classmethod from_config(config)[source]¶
- Return type:
- Parameters:
config (BibNetworkConfig)
- run(dataset=None)[source]¶
Build coupling and co-citation graphs.
- Parameters:
dataset (pd.DataFrame, optional) – Reviewed-included dataset. If None, loaded from
doc_dataset(set via config or auto-detected by Config.load).- Return type:
- save(export_config=None)[source]¶
Export coupling and co-citation graphs to GraphML files.
GraphML is compatible with Gephi, Cytoscape, and networkx.
shared_refsedge sets are serialised as semicolon-separated strings. Falls back to the export config provided at construction time (from YAML).- Return type:
- Parameters:
export_config (BibNetworkExportConfig)