{"id":32174696,"url":"https://github.com/bhargavchippada/forceatlas2","last_synced_at":"2026-02-23T05:01:50.813Z","repository":{"id":44661504,"uuid":"108229632","full_name":"bhargavchippada/forceatlas2","owner":"bhargavchippada","description":"Fastest Gephi's ForceAtlas2 graph layout algorithm implemented for Python and NetworkX","archived":false,"fork":false,"pushed_at":"2024-05-07T17:17:02.000Z","size":851,"stargazers_count":306,"open_issues_count":28,"forks_count":87,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-01-28T01:31:48.283Z","etag":null,"topics":["force-directed-graph","force-layout","forceatlas2","graph","networkx","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhargavchippada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-25T06:33:09.000Z","updated_at":"2026-01-23T14:50:31.000Z","dependencies_parsed_at":"2024-06-18T16:13:59.076Z","dependency_job_id":"b29a4680-b2de-439f-96e9-144eb4221a1b","html_url":"https://github.com/bhargavchippada/forceatlas2","commit_stats":{"total_commits":45,"total_committers":8,"mean_commits":5.625,"dds":"0.48888888888888893","last_synced_commit":"da3ece0b559efcc1cee51bd0f1d56db4732ce50c"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bhargavchippada/forceatlas2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhargavchippada%2Fforceatlas2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhargavchippada%2Fforceatlas2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhargavchippada%2Fforceatlas2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhargavchippada%2Fforceatlas2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhargavchippada","download_url":"https://codeload.github.com/bhargavchippada/forceatlas2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhargavchippada%2Fforceatlas2/sbom","scorecard":{"id":236426,"data":{"date":"2025-08-11","repo":{"name":"github.com/bhargavchippada/forceatlas2","commit":"da3ece0b559efcc1cee51bd0f1d56db4732ce50c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":3,"reason":"Found 6/20 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T05:52:23.183Z","repository_id":44661504,"created_at":"2025-08-17T05:52:23.184Z","updated_at":"2025-08-17T05:52:23.184Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29738083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T04:51:08.365Z","status":"ssl_error","status_checked_at":"2026-02-23T04:49:15.865Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["force-directed-graph","force-layout","forceatlas2","graph","networkx","python"],"created_at":"2025-10-21T19:06:09.820Z","updated_at":"2026-02-23T05:01:50.806Z","avatar_url":"https://github.com/bhargavchippada.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ForceAtlas2 for Python\n\nA port of Gephi's Force Atlas 2 layout algorithm to Python 2 and Python 3 (with a wrapper for NetworkX and igraph). This is the fastest python implementation available with most of the features complete. It also supports Barnes Hut approximation for maximum speedup.\n\nForceAtlas2 is a very fast layout algorithm for force-directed graphs. It's used to spatialize a **weighted undirected** graph in 2D (Edge weight defines the strength of the connection). The implementation is based on this [paper](http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0098679) and the corresponding [gephi-java-code](https://github.com/gephi/gephi/blob/master/modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/forceAtlas2/ForceAtlas2.java). Its really quick compared to the fruchterman reingold algorithm (spring layout) of networkx and scales well to high number of nodes (\u003e10000).\n\n\u003cp align=\"center\" text-align=\"center\"\u003e\n    \u003cb\u003eSpatialize a random Geometric Graph\u003c/b\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"460\" height=\"300\" src=\"https://raw.githubusercontent.com/bhargavchippada/forceatlas2/master/examples/geometric_graph.png\" alt=\"Geometric Graph\"\u003e\n\u003c/p\u003e\n\n## Installation\n\nInstall from pip:\n\n    pip install fa2\n\nTo build and install run from source:\n\n    python setup.py install\n\n**Cython is highly recommended if you are buidling from source as it will speed up by a factor of 10-100x depending on the graph**\n\n### Dependencies\n\n-   numpy (adjacency matrix as complete matrix)\n-   scipy (adjacency matrix as sparse matrix)\n-   tqdm (progressbar)\n-   Cython (10-100x speedup)\n-   networkx (To use the NetworkX wrapper function, you obviously need NetworkX)\n-   python-igraph (To use the igraph wrapper)\n\n\u003cp align=\"center\" text-align=\"center\"\u003e\n    \u003cb\u003eSpatialize a 2D Grid\u003c/b\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"460\" height=\"300\" src=\"https://raw.githubusercontent.com/bhargavchippada/forceatlas2/master/examples/grid_graph.png\" alt=\"Grid Graph\"\u003e\n\u003c/p\u003e\n\n## Usage\n\nfrom fa2 import ForceAtlas2\n\nCreate a ForceAtlas2 object with the appropriate settings. ForceAtlas2 class contains three important methods:\n```python\nforceatlas2 (G, pos, iterations)\n# G is a graph in 2D numpy ndarray format (or) scipy sparse matrix format. You can set the edge weights (\u003e 0) in the matrix\n# pos is a numpy array (Nx2) of initial positions of nodes\n# iterations is num of iterations to run the algorithm\n# returns a list of (x,y) pairs for each node's final position\n```\n```python\nforceatlas2_networkx_layout(G, pos, iterations)\n# G is a networkx graph. Edge weights can be set (if required) in the Networkx graph\n# pos is a dictionary, as in networkx\n# iterations is num of iterations to run the algorithm\n# returns a dictionary of node positions (2D X-Y tuples) indexed by the node name\n```\n```python\nforceatlas2_igraph_layout(G, pos, iterations, weight_attr)\n# G is an igraph graph\n# pos is a numpy array (Nx2) or list of initial positions of nodes (see that the indexing matches igraph node index)\n# iterations is num of iterations to run the algorithm\n# weight_attr denotes the weight attribute's name in G.es, None by default\n# returns an igraph layout\n```\nBelow is an example usage. You can also see the feature settings of ForceAtlas2 class.\n\n```python\nimport networkx as nx\nfrom fa2 import ForceAtlas2\nimport matplotlib.pyplot as plt\n\nG = nx.random_geometric_graph(400, 0.2)\n\nforceatlas2 = ForceAtlas2(\n                        # Behavior alternatives\n                        outboundAttractionDistribution=True,  # Dissuade hubs\n                        linLogMode=False,  # NOT IMPLEMENTED\n                        adjustSizes=False,  # Prevent overlap (NOT IMPLEMENTED)\n                        edgeWeightInfluence=1.0,\n\n                        # Performance\n                        jitterTolerance=1.0,  # Tolerance\n                        barnesHutOptimize=True,\n                        barnesHutTheta=1.2,\n                        multiThreaded=False,  # NOT IMPLEMENTED\n\n                        # Tuning\n                        scalingRatio=2.0,\n                        strongGravityMode=False,\n                        gravity=1.0,\n\n                        # Log\n                        verbose=True)\n\npositions = forceatlas2.forceatlas2_networkx_layout(G, pos=None, iterations=2000)\nnx.draw_networkx_nodes(G, positions, node_size=20, with_labels=False, node_color=\"blue\", alpha=0.4)\nnx.draw_networkx_edges(G, positions, edge_color=\"green\", alpha=0.05)\nplt.axis('off')\nplt.show()\n\n# equivalently\nimport igraph\nG = igraph.Graph.TupleList(G.edges(), directed=False)\nlayout = forceatlas2.forceatlas2_igraph_layout(G, pos=None, iterations=2000)\nigraph.plot(G, layout).show()\n```\nYou can also take a look at forceatlas2.py file for understanding the ForceAtlas2 class and its functions better.\n\n## Features Completed\n\n-   **barnesHutOptimize**: Barnes Hut optimization, n\u003csup\u003e2\u003c/sup\u003e complexity to n.ln(n)\n-   **gravity**: Attracts nodes to the center. Prevents islands from drifting away\n-   **Dissuade Hubs**: Distributes attraction along outbound edges. Hubs attract less and thus are pushed to the borders\n-   **scalingRatio**: How much repulsion you want. More makes a more sparse graph\n-   **strongGravityMode**: A stronger gravity view\n-   **jitterTolerance**: How much swinging you allow. Above 1 discouraged. Lower gives less speed and more precision\n-   **verbose**: Shows a progressbar of iterations completed. Also, shows time taken for different force computations\n-   **edgeWeightInfluence**: How much influence you give to the edges weight. 0 is \"no influence\" and 1 is \"normal\"\n\n## Documentation\n\nYou will find all the documentation in the source code\n\n## Contributors\n\nContributions are highly welcome. Please submit your pull requests and become a collaborator.\n\n## Copyright\n\n    Copyright (C) 2017 Bhargav Chippada bhargavchippada19@gmail.com.\n    Licensed under the GNU GPLv3.\n\nThe files are heavily based on the java files included in Gephi, git revision 2b9a7c8 and Max Shinn's port to python of the algorithm. Here I include the copyright information from those files:\n\n    Copyright 2008-2011 Gephi\n    Authors : Mathieu Jacomy \u003cmathieu.jacomy@gmail.com\u003e\n    Website : http://www.gephi.org\n    Copyright 2011 Gephi Consortium. All rights reserved.\n    Portions Copyrighted 2011 Gephi Consortium.\n    The contents of this file are subject to the terms of either the\n    GNU General Public License Version 3 only (\"GPL\") or the Common\n    Development and Distribution License(\"CDDL\") (collectively, the\n    \"License\"). You may not use this file except in compliance with\n    the License.\n\n    \u003chttps://github.com/mwshinn/forceatlas2-python\u003e\n    Copyright 2016 Max Shinn \u003cmws41@cam.ac.uk\u003e\n    Available under the GPLv3\n\n    Also, thanks to Eugene Bosiakov \u003chttps://github.com/bosiakov/fa2l\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhargavchippada%2Fforceatlas2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhargavchippada%2Fforceatlas2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhargavchippada%2Fforceatlas2/lists"}