Skip to main content

Unified complex network and recurrence analysis toolbox

Project description

https://app.travis-ci.com/pik-copan/pyunicorn.svg?branch=main https://codecov.io/gh/pik-copan/pyunicorn/branch/main/graph/badge.svg https://img.shields.io/pypi/v/pyunicorn https://img.shields.io/pypi/pyversions/pyunicorn https://zenodo.org/badge/33720178.svg

About

pyunicorn (Unified Complex Network and RecurreNce analysis toolbox) is an object-oriented Python package for the advanced analysis and modeling of complex networks. Beyond the standard measures of complex network theory (such as degree, betweenness and clustering coefficients), it provides some uncommon but interesting statistics like Newman’s random walk betweenness. pyunicorn also provides novel node-weighted (node splitting invariant) network statistics, measures for analyzing networks of interacting/interdependent networks, and special tools to model spatially embedded complex networks.

Moreover, pyunicorn allows one to easily construct networks from uni- and multivariate time series and event data (functional/climate networks and recurrence networks). This involves linear and nonlinear measures of time series analysis for constructing functional networks from multivariate data (e.g., Pearson correlation, mutual information, event synchronization and event coincidence analysis). pyunicorn also features modern techniques of nonlinear analysis of time series (or pairs thereof), such as recurrence quantification analysis (RQA), recurrence network analysis and visibility graphs.

pyunicorn is fast, because all costly computations are performed in compiled C code. It can handle large networks through the use of sparse data structures. The package can be used interactively, from any Python script, and even for parallel computations on large cluster architectures. For information about individual releases, see our CHANGELOG and CONTRIBUTIONS.

License

pyunicorn is BSD-licensed (3 clause).

Reference

Please acknowledge and cite the use of this software and its authors when results are used in publications or published elsewhere. You can use the following reference:

J.F. Donges, J. Heitzig, B. Beronov, M. Wiedermann, J. Runge, Q.-Y. Feng, L. Tupikina, V. Stolbova, R.V. Donner, N. Marwan, H.A. Dijkstra, and J. Kurths. “Unified functional network and nonlinear time series analysis for complex systems science: The pyunicorn package”. Chaos 25, 113101 (2015), doi:10.1063/1.4934554, Preprint: arxiv.org:1507.01571 [physics.data-an].

Funding

The development of pyunicorn has been supported by various funding sources, notably the German Federal Ministry for Education and Research (projects GOTHAM and CoSy-CC2), the Leibniz Association (projects ECONS and DominoES), the German National Academic Foundation, and the Stordalen Foundation via the Planetary Boundary Research Network (PB.net) among others.

Getting Started

Installation

Official releases

Stable releases can be installed from the Python Package Index, using a Python package manager such as pip or uv:

$> pip install pyunicorn

Alternatively, source distributions can be downloaded from the GitHub Releases.

On Windows, please first install the latest version of the Microsoft C++ Build Tools, which is required for compiling Cython modules.

Current development version

In order to use a newer version, please follow the pip or uv instructions for installing from version control.

Dependencies

pyunicorn is implemented in Python 3 / Cython 3, is tested on Linux and Windows, and relies on the following packages:

Documentation

For extensive HTML documentation, jump right to the homepage. In a local source tree, HTML and PDF documentation can be generated using Sphinx:

$> pip install --group docs
$> cd docs; make clean html latexpdf

Tutorials

For some example applications, look into the self-explanatory tutorial notebooks: either in the documentation section Tutorials, or in the corresponding source folder.

Development

Test suite

Before committing changes or opening a pull request (PR) to the code base, please make sure that all tests pass. The test suite is managed by tox and is configured to use system-wide packages when available. Install the test dependencies as follows:

$> pip install --group test

The test suite can be run from anywhere in the project tree by issuing:

$> tox

To display the defined test environments and target them individually:

$> tox -l
$> tox -e lint,test,docs

To test individual files:

$> ruff check src/pyunicorn/core/network.py # linting and formatting
$> pytest tests/test_core/test_network.py   # unit tests

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

pyunicorn-1.0.0.tar.gz (32.1 MB view details)

Uploaded Source

File details

Details for the file pyunicorn-1.0.0.tar.gz.

File metadata

  • Download URL: pyunicorn-1.0.0.tar.gz
  • Upload date:
  • Size: 32.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for pyunicorn-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4853ee7c48084a8795daeca1ae2d97ef1bd00da68cdb6262f7a5d4683d5b4d76
MD5 5a14ff8ef3d87450fae8d4affcc94671
BLAKE2b-256 cbde77cbb8444eb8f185dd682528a737013c0006182104cc99685bc63f52a932

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