SciPy

tethne.networks.authors module

Methods for generating networks in which authors are vertices.

author_cocitation Generates an author co-citation network; edges indicate co-citation of authors’ papers.
author_coinstitution Generate a co-institution graph, where edges indicate shared affiliation.
author_institution Generate a bi-partite graph connecting authors and their institutions.
author_papers Generate an author_papers network NetworkX directed graph.
coauthors Generate a co-author network.
tethne.networks.authors.author_cocitation(papers, threshold=1, **kwargs)[source]

Generates an author co-citation network; edges indicate co-citation of authors’ papers.

Similar to papers.cocitation(), except that vertices are authors rather than papers. To generate an author co-citation network, use the networks.authors.author_cocitation() method:

>>> ACC = nt.authors.author_cocitation(papers)
>>> ACC
<networkx.classes.graph.Graph object at 0x106571190>
Element Description
Nodes Author name.
Edge (a, b) if a and b are referenced by the same paper in papers
Edge attribute ‘weight’, the number of papers that co-cite a and b.
Parameters:

papers : list

a list of Paper objects.

threshold : int

Minimum number of co-citations required to create an edge between authors.

Returns:

cocitation : networkx.Graph

A cocitation network.

tethne.networks.authors.author_coinstitution(Papers, threshold=1, **kwargs)[source]

Generate a co-institution graph, where edges indicate shared affiliation.

Some bibliographic datasets, including data from the Web of Science, includes the institutional affiliations of authors. In a co-institution graph, two authors (vertices) have an edge between them if they share an institutional affiliation in the dataset. Note that data about institutional affiliations varies in the WoS database so this will yield more reliable results for more recent publications.

To generate a co-institution network, use the networks.authors.author_coinstitution() method:

>>> ACI = nt.authors.author_coinstitution(papers)
>>> ACI
<networkx.classes.graph.Graph object at 0x106571190>
Element Description
Node Authors.
Node Attribute type (string). ‘author’ or ‘institution’.
Edges (a, b) where a and b are affiliated with the same institution.
Edge attribute overlap (int). number of shared institutions.
Parameters:

Papers : list

A list of wos_objects.

threshold : int

Minimum institutional overlap required for an edge.

Returns:

coinstitution : NetworkX graph

A coinstitution network.

tethne.networks.authors.author_institution(Papers, edge_attribs=, []**kwargs)[source]

Generate a bi-partite graph connecting authors and their institutions.

This may be slightly ambiguous for WoS data where there is no explicit author-institution mapping. Edge weights are the number of co-associations between an author and an institution, which should help resolve this ambiguity (the more data the better).

Element Description
Node Author name.
Edge (a,b) in E(G) if a and b are authors on the same paper.
Parameters:

Papers : list

A list of Paper instances.

edge_attribs : list

List of edge_attributes specifying which Paper keys (from the authored paper) to use as edge attributes. For example, the ‘date’ key in Paper .

Returns:

author_institution_graph : networkx.MultiGraph

A graph describing institutional affiliations of authors in the corpus.

tethne.networks.authors.author_papers(papers, node_id='ayjid', paper_attribs=, []**kwargs)[source]

Generate an author_papers network NetworkX directed graph.

Element Description
Node Two kinds of nodes with distinguishing “type” attributes: * type = paper - a paper in papers * type = person - a person in papers Papers node attributes defined by paper_attribs.
Edge Directed, Author -> his/her Paper.
Parameters:

papers : list

A list of wos_objects.

node_id : string

A key from Paper used to identify the nodes.

paper_attribs : list

List of user-provided optional arguments apart from the provided positional arguments.

Returns:

author_papers_graph : networkx.DiGraph

A DiGraph ‘author_papers_graph’.

Raises:

KeyError : Raised when node_id is not present in Papers.

tethne.networks.authors.coauthors(papers, threshold=1, edge_attribs=['ayjid'], node_attribs=['institution'], geocode=False, **kwargs)[source]

Generate a co-author network.

As the name suggests, edges are drawn between two author-vertices in the case that those authors published a paper together. Co-authorship networks are popular models for studying patterns of collaboration in scientific communities.

To generate a co-authorship network, use the networks.authors.coauthors() method:

Author institutional affiliation is included as a node attribute, if possible.

>>> CA = nt.authors.coauthors(papers)
>>> CA
<networkx.classes.graph.Graph object at 0x10d94cfd0>
Element Description
Node Author name.
Edges (a,b) in E(G) if a and b are coauthors on the same paper.
Parameters:

papers : list

A list of Paper instances.

threshold : int

Minimum number of co-citations required for an edge. (default: 1)

edge_attribs : list

List of edge_attributes specifying which Paper keys (from the co-authored paper) to use as edge attributes. (default: [‘ayjid’])

node_attribs : list

List of attributes to attach to author nodes. Presently limited to ‘institution’.

geocode : bool

If True, attempts to geocode institutional information for authors, and adds latitude, longitude, and precision attributes to each node.

Returns:

G : networkx.Graph

A co-authorship network.

tethne.networks.authors.institutions(papers, threshold=1, edge_attrbs=['ayjid'], node_attribs=['authors'], geocode=False, **kwargs)[source]

Generates an institutional network based on coauthorship.

An edge is drawn between two institutional vertices whenever two authors, one at each respective institution, coauthor a Paper.

>>> I = nt.authors.institutions(papers)
>>> I
<networkx.classes.graph.Graph object at 0x10d94cfd0>
Element Description
Node Institution name and location.
Edges (a,b) in E(G) if coauthors R and S are affiliated with institutions a and b, respectively.
Parameters:

papers : list

A list of Paper instances.

threshold : int

Minimum number of co-citations required for an edge. (default: 1)

edge_attribs : list

List of edge_attributes specifying which Paper keys (from the co-authored paper) to use as edge attributes. (default: [‘ayjid’])

node_attribs : list

List of attributes to attach to author nodes. Presently limited to ‘institution’.

geocode : bool

If True, attempts to geocode institutional information for authors, and adds latitude, longitude, and precision attributes to each node.

Returns:

G : networkx.Graph

An institutional co-authorship network.