{"id":15914598,"url":"https://github.com/pavlin-policar/fdeb","last_synced_at":"2025-10-13T02:33:01.702Z","repository":{"id":187804823,"uuid":"630856474","full_name":"pavlin-policar/FDEB","owner":"pavlin-policar","description":"Force-Directed Edge Bundling (FDEB)","archived":false,"fork":false,"pushed_at":"2023-04-21T17:15:59.000Z","size":1048,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T16:14:32.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pavlin-policar.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}},"created_at":"2023-04-21T10:01:34.000Z","updated_at":"2025-02-10T00:29:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"79c92bd0-7e41-4728-b109-6b2ef19d3132","html_url":"https://github.com/pavlin-policar/FDEB","commit_stats":null,"previous_names":["pavlin-policar/fdeb"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavlin-policar%2FFDEB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavlin-policar%2FFDEB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavlin-policar%2FFDEB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavlin-policar%2FFDEB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pavlin-policar","download_url":"https://codeload.github.com/pavlin-policar/FDEB/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245043948,"owners_count":20551854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-06T17:04:33.012Z","updated_at":"2025-10-13T02:32:56.663Z","avatar_url":"https://github.com/pavlin-policar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Force-Directed Edge Bundling (FDEB)\n\n[![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n![Example](assets/europe_flights.png)\n\n## Installation\n\n`fdeb` can be easily installed through pip using\n\n```\npip install fdeb\n```\n\n## Usage\n\n```python\nedges = ...  # (N, 2, 2) -\u003e N edges, each with two endpoints in 2D\n\nfrom fdeb import fdeb\noptimized_edges = fdeb(edges)\n```\n\n## Notes\n\nThis package currently implements a numpy-only version of the FDEB algorithm, which has asymptotic complexity O(n^2), making it too slow and memory-hungry for large numbers of graphs.\n\nA numba version of this algorithm is also available at https://github.com/verasativa/python.ForceBundle, however, it also implements the O(n^2) algorithm, so it should (asymptotically) run equally slowly as this package, but is more memory efficient, and perhaps a bit faster on larger graphs.\n\n## A longer example\n\n```python\nimport numpy as np\nimport networkx as nx\n\nfrom fdeb import fdeb\n\nimport matplotlib.pyplot as plt\nimport matplotlib.collections as collections\n\n\n# Setup embedding and graph\ng = nx.karate_club_graph()\nx = np.array(list(nx.spring_layout(g).values()))\nadj = nx.to_scipy_sparse_array(g).tocoo()\n\n# Extract edges from embedding and adjacency matrix\nedges = np.stack([x[adj.row], x[adj.col]], axis=1)\n\n# Compute FDEB\nedges_fdeb = fdeb(edges)\n\n# Plot results\nfig, ax = plt.subplots(ncols=2, figsize=(8, 4), dpi=150)\n\ncollection = collections.LineCollection(edges, color=\"k\", alpha=0.05)\nax[0].add_collection(collection)\nax[0].scatter(x[:, 0], x[:, 1], c=\"tab:red\", s=3, zorder=3)\n\ncollection = collections.LineCollection(edges_fdeb, color=\"k\", alpha=0.05)\nax[1].add_collection(collection)\nax[1].scatter(x[:, 0], x[:, 1], c=\"tab:red\", s=3, zorder=3)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpavlin-policar%2Ffdeb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpavlin-policar%2Ffdeb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpavlin-policar%2Ffdeb/lists"}