All Projects β†’ bosiakov β†’ fa2l

bosiakov / fa2l

Licence: GPL-3.0 license
Force Atlas 2 graph layout

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to fa2l

Awesome Community Detection
A curated list of community detection research papers with implementations.
Stars: ✭ 1,874 (+5578.79%)
Mutual labels:  networkx
NetworkX
πŸ…½πŸ…΄πŸ†ƒπŸ††πŸ…ΎπŸ†πŸ…ΊπŸ†‡ An easy & handy library to monitor device internet connection status.
Stars: ✭ 92 (+178.79%)
Mutual labels:  networkx
d3-force-apex-plugin
Oracle APEX Region Type Plugin: D3 Force Network Chart
Stars: ✭ 22 (-33.33%)
Mutual labels:  force-layout
Social-Network-Analysis-in-Python
Social Network Facebook Analysis (Python, Networkx)
Stars: ✭ 26 (-21.21%)
Mutual labels:  networkx
pygna
A Python package for gene network analysis
Stars: ✭ 25 (-24.24%)
Mutual labels:  networkx
football-graphs
Graphs and passing networks in football.
Stars: ✭ 81 (+145.45%)
Mutual labels:  networkx
gqlalchemy
GQLAlchemy is a library developed with the purpose of assisting in writing and running queries on Memgraph. GQLAlchemy supports high-level connection to Memgraph as well as modular query builder.
Stars: ✭ 39 (+18.18%)
Mutual labels:  networkx
xyz2graph
Convert an xyz file into a molecular graph and create a 3D visualisation of the graph.
Stars: ✭ 36 (+9.09%)
Mutual labels:  networkx
PyNets
A Reproducible Workflow for Structural and Functional Connectome Ensemble Learning
Stars: ✭ 114 (+245.45%)
Mutual labels:  networkx
networkx-guide
We here are very big fans of NetworkX as a graph library and its comprehensive set of graph algorithms. For many though, working with NetworkX involves a steep learning curve. This guide is designed as an aid for beginners and experienced users to find specific tips and explore the world of complex networks.
Stars: ✭ 28 (-15.15%)
Mutual labels:  networkx
depx
Examine and visualize dependencies used by Python modules πŸ”
Stars: ✭ 19 (-42.42%)
Mutual labels:  networkx
nodesoup
Force-directed graph layout with Fruchterman-Reingold
Stars: ✭ 40 (+21.21%)
Mutual labels:  force-layout
agentpy
AgentPy is an open-source framework for the development and analysis of agent-based models in Python.
Stars: ✭ 236 (+615.15%)
Mutual labels:  networkx
Stellargraph
StellarGraph - Machine Learning on Graphs
Stars: ✭ 2,235 (+6672.73%)
Mutual labels:  networkx
NetworkxD3
D3 JavaScript networkx Graphs in Python
Stars: ✭ 48 (+45.45%)
Mutual labels:  networkx
Osmnx
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.
Stars: ✭ 3,357 (+10072.73%)
Mutual labels:  networkx
PHANTOM
An efficient implementation of the PHANTOM (GhostDAG) block-DAG protocol, complete with a block-DAG network simulation framework and other niceties.
Stars: ✭ 27 (-18.18%)
Mutual labels:  networkx
coord-sim
Lightweight flow-level simulator for inter-node network and service coordination (e.g., in cloud/edge computing or NFV).
Stars: ✭ 33 (+0%)
Mutual labels:  networkx
nxontology
NetworkX-based Python library for representing ontologies
Stars: ✭ 45 (+36.36%)
Mutual labels:  networkx
discoursegraphs
linguistic converter / merging tool for multi-level annotated corpora. graph-based (using Python and NetworkX).
Stars: ✭ 47 (+42.42%)
Mutual labels:  networkx

Force Atlas 2 Layout

ForceAtlas2 is a continuous graph layout algorithm for handy network visualization.

This implementation is based on this paper.

Warning: Some features (especially Prevent Overlapping) are not completely implemented. I'm waiting for your pull-requests.

Example of social graph rendered with force atlas 2 layout:

https://raw.githubusercontent.com/bosiakov/fa2l/master/_static/result.jpg

Installing

Supports Python 3.3+

Install from pip:

pip install fa2l

To build and install run from source:

python setup.py install

Usage

import networkx as nx
from fa2l import force_atlas2_layout
import matplotlib.pyplot as plt

G = nx.erdos_renyi_graph(100, 0.15, directed=False)

positions = force_atlas2_layout(G,
                                iterations=1000,
                                pos_list=None,
                                node_masses=None,
                                outbound_attraction_distribution=False,
                                lin_log_mode=False,
                                prevent_overlapping=False,
                                edge_weight_influence=1.0,

                                jitter_tolerance=1.0,
                                barnes_hut_optimize=True,
                                barnes_hut_theta=0.5,

                                scaling_ratio=2.0,
                                strong_gravity_mode=False,
                                multithread=False,
                                gravity=1.0)

nx.draw_networkx(G, positions, cmap=plt.get_cmap('jet'), node_size=50, with_labels=False)
plt.show()

Features

Force Atlas 2 features these settings:

  • Approximate Repulsion: Barnes Hut optimization: nΒ² complexity to n.ln(n).
  • Gravity: Attracts nodes to the center. Prevents islands from drifting away.
  • Dissuade Hubs: Distributes attraction along outbound edges. Hubs attract less and thus are pushed to the borders.
  • LinLog mode: Switch ForceAtlas model from lin-lin to lin-log. Makes clusters more tight.
  • Prevent Overlap. WARNING! Does not work very well.
  • Tolerance: How much swinging you allow. Above 1 discouraged. Lower gives less speed and more precision.
  • Edge Weight Influence: How much influence you give to the edges weight. 0 is "no influence" and 1 is "normal".

Documentation

You will find all the documentation in the source code

Copyright

Copyright Eugene Bosiakov. Licensed under the GNU GPLv3.

This files are based on the java files included in Gephi (Copyright 2011 Gephi Consortium).

Also thanks to Max Shinn.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].