Skip to main content

A package for analyzing and visualizing university authorship networks

Project description

CoAuthorNet

CoAuthorNet is a Python package for analyzing and visualizing university authorship networks. It facilitates the retrieval of publication data for university staff, builds co-authorship networks, calculates network metrics, and visualizes the largest connected component of the network. CoAuthorNet is ideal for researchers interested in studying collaboration patterns within academic institutions.

Features

  • Fetch publication data for university staff from Google Scholar
  • Create bipartite author-publication and co-authorship networks
  • Calculate network metrics (average degree, clustering coefficient, shortest path length, etc.)
  • Visualize the largest connected component of the co-authorship network

Installation

To install CoAuthorNet, use pip:

pip install CoAuthorNet

Requirements

CoAuthorNet requires the following dependencies:

  • pandas
  • networkx
  • numpy
  • matplotlib
  • tqdm
  • scholarly

These are automatically installed with the package.

Usage

Here’s a quick example to get started with CoAuthorNet.

  1. Prepare a CSV file with a column named Staff Name, containing the names of staff members. Example CSV (author_school.csv):

    Staff Name,School,Faculty
    Alice Smith,School of Chemistry,Faculty of Science
    Bob Jones,School of Physics,Faculty of Science
    
  2. Run the code below to create and analyze the co-authorship network:

     import CoAuthorNet as yn
     import pandas as pd
    
     staff_data = pd.read_csv("./author_school.csv")
     staff_publications_data = yn.fetch_publications(staff_data, affiliation = 'insert_affiliation')
    
    
     G, author_dict, paper_dict = yn.create_bipartite_network(staff_publications_data)
     author_network = yn.create_authorship_network(G, author_dict)
    
    
     author_network_gc = yn.get_largest_component(author_network)
     yn.save_graph(author_network_gc, "largest_component.graphml")
     metrics = yn.calculate_metrics(author_network_gc)
     print(metrics)
    

Function Reference

  • fetch_publications(staff_data, output_csv='staff_publications_data.csv', affiliation)

    • Fetches publication data for each staff member and saves it to a CSV file. Affiliation corresponds to the university or orgnization the individual is connected to. This will allow for more accurate results incase of duplicate names. If unknown, that leave blank.
  • create_bipartite_network(df)

    • Creates a bipartite network of authors and publications from the data.
  • create_authorship_network(G, author_dict)

    • Converts the bipartite network into a co-authorship network.
  • get_largest_component(graph)

    • Extracts the largest connected component of a graph.
  • calculate_metrics(G)

    • Calculates various network metrics like average degree, clustering coefficient, etc.
  • save_graph(G)

    • Saves largest component as a .graphml file.
  • plot_network(G, output_file='largest_component_network.png')

    • Plots and saves the largest connected component of the co-authorship network.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Feel free to submit a pull request or report issues.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CoAuthorNet-0.2.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

CoAuthorNet-0.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file CoAuthorNet-0.2.0.tar.gz.

File metadata

  • Download URL: CoAuthorNet-0.2.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.1

File hashes

Hashes for CoAuthorNet-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5a52120d0f3634e8ab3e31ddd99f723003ee08cd1dc7f12213bf0642be380da8
MD5 b033941603168e2168d56fc5c8e17a09
BLAKE2b-256 1e04853d9362531bda3ee564d2a0e9821ba518d6846d24a4ab87d4f211765b93

See more details on using hashes here.

File details

Details for the file CoAuthorNet-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: CoAuthorNet-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.1

File hashes

Hashes for CoAuthorNet-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5f8aed80da09653d13e37c77db1294abfd6e4ea440bde14ab6d1d3f2c463e07
MD5 3d5040b05d43a1bad4a1ee24867d5b81
BLAKE2b-256 1bebc3c190a298708879a3e5e9d6d93f0e0b6e75f7668a3a26570d72f23d85ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page