{"id":19850636,"url":"https://github.com/m30m/cluster_pack","last_synced_at":"2026-02-08T11:02:23.070Z","repository":{"id":83406765,"uuid":"133934311","full_name":"m30m/cluster_pack","owner":"m30m","description":"A simple tool for visualizing clusters using D3.js","archived":false,"fork":false,"pushed_at":"2018-07-24T07:58:15.000Z","size":150,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-26T16:45:49.168Z","etag":null,"topics":["cluster-analysis","clustering","d3-js","d3-visualization","visual-analytics","visualization"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m30m.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":"2018-05-18T09:36:56.000Z","updated_at":"2018-07-24T07:58:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"66b5483b-9ac4-4226-9735-050badf7c65b","html_url":"https://github.com/m30m/cluster_pack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/m30m/cluster_pack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m30m%2Fcluster_pack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m30m%2Fcluster_pack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m30m%2Fcluster_pack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m30m%2Fcluster_pack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m30m","download_url":"https://codeload.github.com/m30m/cluster_pack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m30m%2Fcluster_pack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29228544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T09:43:19.170Z","status":"ssl_error","status_checked_at":"2026-02-08T09:42:55.556Z","response_time":57,"last_error":"SSL_read: 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":["cluster-analysis","clustering","d3-js","d3-visualization","visual-analytics","visualization"],"created_at":"2024-11-12T13:27:11.493Z","updated_at":"2026-02-08T11:02:23.038Z","avatar_url":"https://github.com/m30m.png","language":"HTML","readme":"# Cluster Pack\n\nA tiny python library for visualizing hierarchical clusters using packed circle visualization\n\n# Installation\n\nYou can install this package directly from github using the following command:\n\n```sh\npip3 install git+https://github.com/m30m/cluster_pack.git\n```\n\n# Usage\n\n## Structure of clustering input\n\nThe input should have a structure like the one below:\n\n```python\n{\n  \"name\": \"root\",\n  \"children\": [\n    {\n      \"size\": 4,\n      \"name\": \"cluster1\"\n    },\n    {\n      \"name\": \"cluster2\",\n      \"children\": [\n        {\n          \"size\": 3,\n          \"name\": \"subcluster1\"\n        },\n        {\n          \"size\": 1,\n          \"name\": \"subcluster2\"\n        }\n      ]\n    }\n  ]\n}\n```\n\nEach node can have the following attributes:\n\n```python\n{\n  \"name\": \"root\", # name shown on the plot\n  \"children\": [...], # array of nodes\n  \"size\": 4, # size of the cluster\n  \"color\": \"red\", # can be anything\n  \"info\": \"any extra information\", # this will be shown in the info box next to the plot, it can be arbitrary html\n  \"image\": \"file://path/to/some/image.jpg\" # background of the circle in clustering, useful for image clustering\n}\n```\n\nNodes should either have the `children` attribute or `size` attribute if they are leaf nodes.\n\n## API\n\nIf you are using jupyter notebook:\n\n```python\nfrom cluster_pack import visualize_notebook\n\nvisualize_notebook(clusters, size=900) # size parameter is the width and height of output svg\n```\n\nIf you want the raw html:\n\n```python\nfrom cluster_pack import visualize\n\nhtml = visualize(clusters, size=900)\n\nwith open('output.html','w') as output_file:\n    output_file.write(html)\n```\n\n\n# Screenshots\n\n![Screenshot](screenshots/word_digits.png?raw=true \"Sample Clustering output\")","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm30m%2Fcluster_pack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm30m%2Fcluster_pack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm30m%2Fcluster_pack/lists"}