S2Graph¶
Warning
This module is under active development and may change significantly in future versions.
-
class
s2.graph.S2Graph(edges=None, papers=None, authors=None)¶ Class for storing citation network subgraph.
- Parameters
edges (
EdgeMap, optional) –Stores subgraph edge information. While
S2PaperandS2Authoralready contain the information required to reconstruct citation graphs, they do not allow arbitrary subgraphs and are not as lightweight as a simple mapping of identifiers.Defaults to
defaultdictwith factory forNeighboursfor in-memory storage.papers (
S2PaperMap, optional) –Stores
S2Paperobjects retrievable byPaperId. Recommended to uses2.store.S2DataStoreto avoid keeping large amounts of data in memory.Defaults to
dict.authors (
S2AuthorMap, optional) –Stores
S2Authorobjects retrievable byAuthorId. Recommended to uses2.store.S2DataStoreto avoid keeping large amounts of data in memory.Defaults to
dict.