Interactively visualize networks with Ulf Aslak's d3-tool from Python.
Project description

# netwulf
This package provides an interface between [networkx](https://networkx.github.io/) Graph objects and
[Ulf Aslak's interactive web app](https://github.com/ulfaslak/network_styling_with_d3) for simple
and better network visualizations.
## Install
pip install netwulf
## Example
### Standard
Create a network and look at it
```python
import networkx as nx
from netwulf import visualize
G = nx.barabasi_albert_graph(100,m=1)
visualize(G)
```

### Config
It's possible to change the default settings which are
```python
default_config = {
'Apply heat (wiggle)': False,
'Charge strength': -10,
'Center gravity': 0.1,
'Link distance': 10,
'Link width': 2,
'Link alpha': 0.5,
'Node size': 10,
'Node stroke size': 0.5,
'Node size exponent': 0.5,
'Link strength exponent': 0.1,
'Link width exponent': 0.5,
'Collision': False,
'Node fill': '#16a085',
'Node stroke': '#000000',
'Link stroke': '#7c7c7c',
'Label stroke': '#000000',
'Show labels': False,
'Zoom': 1.5,
'Min. link weight %': 0,
'Max. link weight %': 100
}
```
It's done like so:
```python
import networkx as nx
from netwulf import visualize
G = nx.barabasi_albert_graph(5000,m=1)
visualize(G,config={
'Node size': 11,
'Charge strength' : -0.8,
'Link distance' : 10,
'Link width' : 1,
'Collision' : True,
})
```

# netwulf
This package provides an interface between [networkx](https://networkx.github.io/) Graph objects and
[Ulf Aslak's interactive web app](https://github.com/ulfaslak/network_styling_with_d3) for simple
and better network visualizations.
## Install
pip install netwulf
## Example
### Standard
Create a network and look at it
```python
import networkx as nx
from netwulf import visualize
G = nx.barabasi_albert_graph(100,m=1)
visualize(G)
```

### Config
It's possible to change the default settings which are
```python
default_config = {
'Apply heat (wiggle)': False,
'Charge strength': -10,
'Center gravity': 0.1,
'Link distance': 10,
'Link width': 2,
'Link alpha': 0.5,
'Node size': 10,
'Node stroke size': 0.5,
'Node size exponent': 0.5,
'Link strength exponent': 0.1,
'Link width exponent': 0.5,
'Collision': False,
'Node fill': '#16a085',
'Node stroke': '#000000',
'Link stroke': '#7c7c7c',
'Label stroke': '#000000',
'Show labels': False,
'Zoom': 1.5,
'Min. link weight %': 0,
'Max. link weight %': 100
}
```
It's done like so:
```python
import networkx as nx
from netwulf import visualize
G = nx.barabasi_albert_graph(5000,m=1)
visualize(G,config={
'Node size': 11,
'Charge strength' : -0.8,
'Link distance' : 10,
'Link width' : 1,
'Collision' : True,
})
```

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
netwulf-0.0.3.tar.gz
(216.2 kB
view details)
File details
Details for the file netwulf-0.0.3.tar.gz.
File metadata
- Download URL: netwulf-0.0.3.tar.gz
- Upload date:
- Size: 216.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c133c7d37abb0118ea220e4ff86cd2900b66bea1a6723e4969d9ddc1f8a644d4
|
|
| MD5 |
4ae90a578b66cb3c93a38d31bb40ebe1
|
|
| BLAKE2b-256 |
bd292d15ca074af7c80e17f613d867e66e0b20c76acc2cae6f620e4665023fc0
|