Skip to main content

Python package to study inequalities in social networks

Project description

NetworkInequality

NetIn is a python package for network inference. It is based on the NetworkX package and provides a set of methods to study network inequalities. The package is currently under development and will be updated regularly.

https://github.com/CSHVienna/NetworkInequalities/actions/workflows/python-app.yml/badge.svg https://img.shields.io/badge/python-3.9-blue.svg https://img.shields.io/badge/NetworkX-3.1-blue.svg https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg https://static.pepy.tech/personalized-badge/netin?period=total&units=international_system&left_color=black&right_color=orange&left_text=Downloads

Simple examples

Create an undirected network with preferential attachment and homophily.

>>> from netin.models import PAHModel
>>> m = PAHModel(N=200, m=2, f_m=0.2, h_M=0.1, h_m=0.9, seed=42)
>>> m.simulate()

Create a directed network with preferential attachment and homophily.

>>> from netin.models import DPAHModel
>>> m = DPAHModel(N=200, f_m=0.2, d=0.02, h_M=0.1, h_m=0.6, plo_M=2.0, plo_m=2.0, seed=42)
>>> m.simulate()

Install

Install the latest version of NetIn:

$ pip install netin

Install from source:

$ git clone
$ cd NetworkInequalities
$ pip install -e .

Bugs

Please report any bugs that you find here. Or, even better, fork the repository on GitHub and create a pull request (PR). We welcome all changes, big or small, and we will help you make the PR if you are new to git.

License

Released under Creative Commons by-nc-sa 4.0 (see LICENSE):

Copyright (C) 2023-2024 NetIn Developers
Fariba Karimi <karimi@csh.ac.at>
Lisette Espin-Noboa <espin@csh.ac.at>
Jan Bachmann <bachmann@csh.ac.at>

Note on multidimensional interactions

Provisionally, the code to simulate and analyze networks with multidimensional interactions is hosted in the [repository](https://github.com/CSHVienna/multidimensional_social_interactions_paper) associated with the [paper](https://arxiv.org/abs/2406.17043).

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

netin-2.0.0a1.tar.gz (67.9 kB view hashes)

Uploaded Source

Built Distribution

netin-2.0.0a1-py3-none-any.whl (89.8 kB view hashes)

Uploaded Python 3

Supported by

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