Experimental library to visualize complex networks
Project description
Helios FR
Helios FR is a python library implemented in C for layouting and visualizing complex networks. It implements the Fruchterman-Reingold (FR) algorithm.
Layout
Helios implements a force layout algorithm based on the FR algorithm [1].
Install
Requires python headers and a C11 compatible compiler, such as gcc or clang.
To install it, simply run:
pip install heliosFR
or clone this repository and install it from master by running:
pip install git+git://github.com/heliosnet/helios-core.git
Usage
Currently only the FR layout interface is implemented.
Example initialization with a small network.
import numpy as np
import heliosFR
positions = np.random.random((4, 3))
edges = np.array([
[0,1],
[2,3]
],dtype=np.uint64)
# positions is required to be an contiguous float32 numpy array
positions = np.ascontiguousarray(positions,dtype=np.float32)
# edges is required to be an contiguous uint64 numpy array
edges = np.ascontiguousarray(edges,dtype=np.uint64)
# speeds is required to be an contiguous uint64 numpy array
speeds = np.zeros(positions.shape,dtype=np.float32)
layout = heliosFR.FRLayout(edges, positions, speeds, maxWorkers=8,updateInterval=10)
Two APIS are available to iterate the layouts, synchronized and aynchronous.
Example of the synchronized API:
print("Initial positions:")
print(layout.positions)
layout.iterate(iterations=100)
print("Final positions:")
print(layout.positions)
Example using the aynchronous API:
print("Initial positions:")
print(layout.positions)
if(layout.running()): #False
print("It is running...")
else:
print("Not running...")
layout.start()
time.sleep(1)
print("Current positions:")
print(layout.positions)
time.sleep(1)
print("Current positions:")
print(layout.positions)
if(layout.running()): #True
print("It is running...")
else:
print("Not running...")
layout.stop()
print("Final positions:")
print(layout.positions)
You can restart the layout once it stopped. Subsequent calls to the start
method have no effect if the layout is running.
Compiling on windows:
You need m2w64 and libpython to compile it.
conda install -c anaconda libpython
conda install -c msys2 m2w64-toolchain
You can now use pip install:
pip install ./
or compile distribs:
python setup.py sdist bdist_wheel
Creating a build environment using:
conda create -n buildpy36 -c default -c anaconda -c msys2 python=3.6 numpy libpython m2w64-toolchain
change python=3.6
and buildpy36
to the version of python you would like to use.
References
[1] Fruchterman, T. M. J., & Reingold, E. M. (1991). Graph Drawing by Force-Directed Placement. Software: Practice and Experience, 21(11).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for heliosFR-0.3.1-pp37-pypy37_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bfac38206049eee7a8fc2148e3e10412c02b6b393e1e790a18cb77aeda7972a |
|
MD5 | 0948d825d386a654958fdaa987fc9301 |
|
BLAKE2b-256 | b82533e5754e312f03eae6b052ce4328d114738dd8435f0f010f3b9993acfb4f |
Hashes for heliosFR-0.3.1-pp36-pypy36_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af7f1f4817b020fef33d35e5fb66dc410c77189ffc850225d3aa177c2007dc89 |
|
MD5 | 1e106ac99631aa3e896f954f89f2c9c7 |
|
BLAKE2b-256 | ea98f053e0709e61b587666bebf1b7b210e4521f50a59b7d308d9e5bb6e662fd |
Hashes for heliosFR-0.3.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 907c89e3758682129d3af427511cbb267d71aa384d338b1a99e6f68623a9b97c |
|
MD5 | b66111053e635e7a458dc9442cb9d1ac |
|
BLAKE2b-256 | d39eb49a9f86bcfc02ddaab5f554433db88958a92770ef86dbd2d8d9e005cc4b |
Hashes for heliosFR-0.3.1-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb5da92524abfcf5124307ad6f3230d35b25046967cc074432948845079f10e8 |
|
MD5 | 9ecb8c25b36c98cc7d64259dee53ec3f |
|
BLAKE2b-256 | 41294de3bb5df59ecb9cf119ef617855af00c54b9448074ca6d010bdc944c043 |
Hashes for heliosFR-0.3.1-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33807fd9504d3c8c3dd7ec3e18e1080ce1f38114e69016a817d1dcb9280df0b2 |
|
MD5 | 76696a2d85356fed4362e48ae71e3197 |
|
BLAKE2b-256 | b9b45cd106c726c5dbf6da2e1c6f5971eab597f09c24847337efb9a1b9db0b19 |
Hashes for heliosFR-0.3.1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51c261dfa611d399bf876e8a4af9d513593287c5a061a520b21009e0e361f6d5 |
|
MD5 | 9d1e7acd81ec5e3bc388ce4648b07884 |
|
BLAKE2b-256 | 931356e2e289c8df07825f79def14da45d462f365b36636ded29e348e4710bde |
Hashes for heliosFR-0.3.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfa6b062a8703b3097ca44874d020ecae70cc58dc724f0ef61ef241fcd385221 |
|
MD5 | 0addbcc50c16159b8c89d8118540b889 |
|
BLAKE2b-256 | 2649d9b1146de541ab7b5c203f29d096ee1f763052360ce347641e8abfb08965 |
Hashes for heliosFR-0.3.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b8193db645027b76c91c9303296bf6e2ce3ed8f3d6b0ae67f1bf5c0b1d43cb0 |
|
MD5 | fea234da0de32d3965c7a61c05cc5987 |
|
BLAKE2b-256 | 5b1be6d8e45e05492a872609128730a5229e0dc23bfefde0df4ec5c59b139530 |
Hashes for heliosFR-0.3.1-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 623bc0824c58e0bc8a1f3a1d04ba42294d05f1f37554c7a6e44cb6e0844167a9 |
|
MD5 | 4dd115f02387ca3956e31c444c43705a |
|
BLAKE2b-256 | 9ac39cf95f4c7ba2563d9981bc4832fca46725891edde3a6c68b52f35b090561 |
Hashes for heliosFR-0.3.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65be334ee71510b34ba1aa1b1124d5a250cd0cb253c5b93e629befc979102205 |
|
MD5 | ba9a4fdf0ba3ed344c8d7cce443e0ec4 |
|
BLAKE2b-256 | fcace0b6cb54cfb8346d0fdacb79601cb008ae54ce118a9d6d1af08a127ef668 |
Hashes for heliosFR-0.3.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84c6ed44e7f5ae2ac446e566984edceb0c0802942a8ac399f2c6998360a2fed8 |
|
MD5 | 78cb6d7a1f445d639c2b5fbf44c7d9cf |
|
BLAKE2b-256 | ab2288df271e8ca7a645f55e02779e132896e96585dfdb1f1b4917687748f726 |
Hashes for heliosFR-0.3.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f295dff6aef9fbefed77c3bd648d6233ca093c3aa9e988872c6b479705cf039 |
|
MD5 | d4a1613e7fed4885790f2d0c36056beb |
|
BLAKE2b-256 | 6e03f54cb89164c423b46de6538619a75c4de01bac8ac268e9fb00a6ec7f85a9 |
Hashes for heliosFR-0.3.1-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b77fc2fe364a89ae398faea16396df70ceb70ab1b721c9bd6b7df6223ee8744 |
|
MD5 | b7ac1cc47b2d9bfc443548eceb838d21 |
|
BLAKE2b-256 | 2f41516b78c7b3b8a818544480e7e292cdd3fa187693889fb23a2cfec3bcd15d |
Hashes for heliosFR-0.3.1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba21e98ae2c886d675bea491f898da8fd90fe05689c1b44bfe018404b0bf094b |
|
MD5 | 0c36f6e0da074de2f1d8b8580203ec6b |
|
BLAKE2b-256 | c63b25aa4133887b80cb57cf035d6dd4cbc8421165ebccbc2ff8d6ea99fcc653 |
Hashes for heliosFR-0.3.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e30f728916182dfa608b0c4726a5a9a571b50dda70f48e960e071410b46d0fbb |
|
MD5 | 414c9fec04e366f8b80a28e27bc4972e |
|
BLAKE2b-256 | f94a686fc400cbb08ffa260a994623e0fccb21b5e4cef6dae6f05334e2ba48e2 |
Hashes for heliosFR-0.3.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c11e8904b2d934cd7f0274d89849a1665477c6bb314a3535571b582cf8cf3da |
|
MD5 | b0a5f97fc12dd56d0feeaef1c44286c7 |
|
BLAKE2b-256 | ee2b7927d6d139d2ec340563f86b3df710f59950d28a1b3b3f37e9164b0377c9 |
Hashes for heliosFR-0.3.1-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2daef8f41cb4cd02acc20199848e53bafbaca0d9ce7eb2e690b26acc3640f881 |
|
MD5 | 0f11db72ad97a46d5f409b9796cefec8 |
|
BLAKE2b-256 | 8ae12dc5ba0ce6c084dfb073d8bff70ce39ed2741e3d637a096889bcdcd03377 |
Hashes for heliosFR-0.3.1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d9a452a871d5d006da3a97c4d48b0f2ddd9030fcc1782c040fa869fc1d2c7b6 |
|
MD5 | d8ace5691a145b31edfa284416aa50bd |
|
BLAKE2b-256 | 3470d4e2f1ec8cad299a4c0482deb2fe5d98a2225fa83a5051afc877e3d4e02f |