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:
pandasnetworkxnumpymatplotlibtqdmscholarly
These are automatically installed with the package.
Usage
Here’s a quick example to get started with CoAuthorNet.
-
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
-
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) 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')- Fetches publication data for each staff member and saves it to a CSV file.
-
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
.graphmlfile.
- Saves largest component as a
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file CoAuthorNet-0.1.0.tar.gz.
File metadata
- Download URL: CoAuthorNet-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b4db2d24308d77b722876c0266ada89649d5066c904d809eb13c2d709a13866
|
|
| MD5 |
d28831b4efe97464613cbe62a9afeb33
|
|
| BLAKE2b-256 |
6671b6f65cef1c9c4d39834f3334406272c87045d913d555c708e0925298c081
|
File details
Details for the file CoAuthorNet-0.1.0-py3-none-any.whl.
File metadata
- Download URL: CoAuthorNet-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb5de74f49f716d4d410cb8c995c2fd20562133d30fbfbf1b8fd633fdf7f4d5d
|
|
| MD5 |
09a834d600b586dc37ca6f909d80dce6
|
|
| BLAKE2b-256 |
f6575895a615d3d6853676a89ed8b6e071ff71c2750953adfa66c5020be50d65
|