nctx - Networks in ConTeXt

nctx - Networks in ConTeXt

nctx - Networks in ConTeXt

The package nctx provides functionality to analyze attributed networks. Unique feature of this package is the ability to enforce contextual constraints via user-defined functions during shortest path discovery and centrality calculation. For a basic example, see here.

The source code is accessible on github.

Installation

Usually, Python packages can be installed using the pip package manager downloading a package from a repository as part of the installation process. Since nctx is a C++ library wrapped for Python, the package can’t be distributed via a repository as it needs to be compiled on your computer. The pip package manager does not provide this functionality. Therefore, you first need to compile the package and install it using pip afterwards.

Compiling the nctx package for Python3 requires an installation of:

Under Ubuntu, these requirements can be installed using

sudo apt install libboost1.71-dev cmake build-essential
pip3 install scikit-build

Note that this simply installs all available Boost libraries. Strictly required are libboost-graph-dev and libboost-python-dev.

Then, in the root of the source directory, call

python3 setup.py bdist_wheel

to produce a whl-file (a Python-wheel). This whl-file is found under the dist/-subfolder and can then be installed with

pip3 install dist/nctx-*.whl

Citation

If you use the nctx package, please cite the corresponding tech report:

Mirco Schoenfeld. nctx - Networks in ConTeXt. University of Bayreuth, 2021.

You might use the following BibTeX entry:

@techreport{2021-schoenfeld-nctx,
month = {June},
institution = {University of Bayreuth},
address = {Bayreuth, Germany},
author = {Mirco Schoenfeld},
title = {nctx - Networks in ConTeXt},
year = {2021},
keywords = {network analysis, attributed networks, context-awareness, library, python, R, C++},
}