catnet
What catnet does
catnet is a Python package that allows for transforming tabular data into a network structure. catnet can identify the coexistence of variables and categories in literature reviews and other tables and create a network dataframe that can be exported into a format that can be taken by other packages such as networkx and applications such as Gephi.
catnet is a Python package designed to facilitate the creation and analysis of category networks. Whether you’re working with literature review tables or other structured data, catnet empowers researchers and analysts to build insightful networks that reveal relationships and patterns within their categories. Streamline your data exploration and enhance your analytical capabilities with catnet!
How to install catnet
To install this package run:
python -m pip install git+https://github.com/CamiBetancur/catnet/)
Get started using catnet
To be able to use catnet you need to format your dataframe in one of the following ways:
1. "Long" format
"Long" format refers to data that has a column for describing a categorical variable (var_col) and an identifier column (id_col) that identifies to which entity that variable belongs to. For example, in a literature review, a long dataframe that could be used by catnet could look like this (note that the column names id_col and var_col do not necessarily need to be named id_col and var_col):
| id_col | var_col | other_data_cols |
|---|---|---|
| doc_01 | Health | ... |
| doc_01 | Water access | ... |
| doc_01 | Water quality | ... |
| doc_02 | Health | ... |
| doc_02 | Energy generation | ... |
| ... | ... | ... |
Datasets in "long" format can be transformed into networks by using the catnet.from_long_df() function. For more information, you can look at the Examples Jupyter Notebook or the Examples Markdown file.
2. "Same cell" format
Dataframes in the "same cell" format contain a list of categories insid the same cell. The identifier colum (id_col) marks different documents/observations, while the categorical variable column (var_col) contains the lists of categories.
| id_col | var_col | other_data_cols |
|---|---|---|
| doc_01 | Health; Water | ... |
| access; Water | ||
| quality | ||
| doc_02 | Health; Energy | ... |
| generation | ||
| ... | ... | ... |
Datasets in the "same cell" format can be transformed into networks by using the catnet.from_same_cell() function. For more information, you can look at the Examples Jupyter Notebook or the Examples Markdown file.
How to cite catnet
APA 7
Betancur Jaramillo, J. C. (2024). catnet source code (Version 0.1.0) [source code]. https://github.com/CamiBetancur/catnet/.
BibTex
@misc{Betancur_2024,
title={catnet v0.1.0},
url={https://github.com/CamiBetancur/catnet},
publisher={Stockholm Environment Institute},
author={Betancur Jaramillo, Juan Camilo},
year={2024}}
Release files for catnet 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| catnet-0.1.0.tar.gz | 21.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| catnet-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.5 kB
Release files / catnet-0.1.0.tar.gz
| Download URL | catnet-0.1.0.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3e4ffb32443267193518dd8296c1df572f002d52e1ef6d04e16b191c6d5b08f
|
|
BLAKE2b-256 checksum How to use checksums |
3d898752398b3ca9c77c86f90d0ff76c4e4888e57a8f2640a8903bbd3907bf8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.13.0 Windows/11
|
Release files / catnet-0.1.0-py3-none-any.whl
| Download URL | catnet-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e37dbef6e16c24bca512177b7f6510104654767b2cfd792ba13341c14bbf0b4
|
|
BLAKE2b-256 checksum How to use checksums |
f6c6c042aa184c6e1e0b862b1f543ed897ccc6c9a52d2adfeebea0cf0f2dd6e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.13.0 Windows/11
|