Metadata-Version: 2.1
Name: pymnet
Version: 0.3.0
Summary: Multilayer network analysis library for Python
Author-email: Mikko Kivelä <mikko.kivela@iki.fi>
License: GPLv3
Project-URL: homepage, https://mnets.github.io/pymnet/
Project-URL: documentation, https://mnets.github.io/pymnet/
Project-URL: repository, https://github.com/mnets/pymnet
Project-URL: bug-tracker, https://github.com/mnets/pymnet/issues
Keywords: Complex Networks,Networks,network,Graphs,Graph Theory,graph,Multilayer Networks,multilayer network
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: matplotlib >=3.7.0
Requires-Dist: numpy >=1.23.0
Requires-Dist: scipy >=1.10.0
Requires-Dist: networkx <4.0,>=2.0
Requires-Dist: bliss-bind >=0.3.0 ; (sys_platform == "darwin" or ((platform_machine == "x86_64" and sys_platform == "linux") or (platform_machine == "AMD64" and sys_platform == "win32"))) and python_version >= "3.8"
Provides-Extra: dev
Requires-Dist: black >=24.4 ; extra == 'dev'
Requires-Dist: isort >=5.13 ; extra == 'dev'
Provides-Extra: test
Requires-Dist: coverage >=7.0 ; extra == 'test'
Provides-Extra: tutorial
Requires-Dist: jupyterlab >=4.2 ; extra == 'tutorial'
Requires-Dist: pandas ; extra == 'tutorial'

# pymnet: A Python Library for Multilayer Networks

[![codecov](https://codecov.io/gh/mnets/pymnet/graph/badge.svg?token=LI6QBAF7N0)](https://codecov.io/gh/mnets/pymnet)

`pymnet` is a Python package for creating, analyzing, and visualizing multilayer networks as formalized by [Kivelä et al. (2014)](https://doi.org/10.1093/comnet/cnu016).
It is designed for network scientists with an easy-to-use yet flexible interface, featuring, inter alia, representations of a very general class of multilayer networks, structural metrics of multilayer networks, and random multilayer-network models. 

To learn more about the concepts and design principles underlying `pymnet`, check out [this overview](https://mnets.github.io/pymnet/overview.html).

## Features

* Written in pure Python
* Full support for general [multilayer networks](http://comnet.oxfordjournals.org/content/2/3/203)
* Efficient handling of multiplex networks (with automatically generated lazy evaluation of coupling edges)
* Extensive functionality –– analysis, transformations, reading and writing networks, network models, etc.
* Flexible multilayer-network visualization (using Matplotlib and D3)
* Integration with [NetworkX](https://networkx.org/) for monoplex network analysis

## Working with pymnet

### Installation
We recommend executing the following command in a virtual environment: 
> pip install pymnet

### Usage
To get started with `pymnet`, check out our [tutorials](https://mnets.github.io/pymnet/tutorials) –– and when in doubt, consult the [API reference](https://mnets.github.io/pymnet/reference.html) contained in our [documentation](https://mnets.github.io/pymnet/).

As an introductory example, with the following code, we can create a small multiplex network capturing different types of social relations between individuals and visualize the result:

```python
from pymnet import *

net_social = MultiplexNetwork(couplings="categorical", fullyInterconnected=False)
net_social["Alice", "Bob", "Friends"] = 1
net_social["Alice", "Carol", "Friends"] = 1
net_social["Bob", "Carol", "Friends"] = 1
net_social["Alice", "Bob", "Married"] = 1

fig_social = draw(net_social, layout="circular", layerPadding=0.2, defaultLayerLabelLoc=(0.9,0.9))
```

<p align="center" style="margin-top:-6rem;margin-bottom:-3rem">
    <img alt="An image of a small multiplex social network." width="60%" src="socialnet.png"> 
</p>


## Contributing

We welcome contributions!
Before you get started, please check out our [contribution guide](CONTRIBUTING.md).

## Asking Questions

* For bugs, feature requests, etc., please use [GitHub issues][github-issues].
* Otherwise, feel free to contact the main developer: [Mikko Kivelä](http://www.mkivela.com/)

[github-issues]: https://github.com/mnets/pymnet/issues
