{"id":30141963,"url":"https://github.com/solzimer/sdbscan","last_synced_at":"2025-08-11T05:21:14.528Z","repository":{"id":57154515,"uuid":"98170702","full_name":"solzimer/sdbscan","owner":"solzimer","description":"dbscan cluster algorythm for javascript. works in node and browser","archived":false,"fork":false,"pushed_at":"2017-07-28T22:48:12.000Z","size":156,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T15:44:48.977Z","etag":null,"topics":["classification","cluster","clustering","dbscan","density","groups","multidimensional","noise","spatial","unidimensional"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solzimer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-24T09:00:05.000Z","updated_at":"2024-02-23T19:57:53.000Z","dependencies_parsed_at":"2022-09-05T15:41:54.060Z","dependency_job_id":null,"html_url":"https://github.com/solzimer/sdbscan","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/solzimer/sdbscan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solzimer%2Fsdbscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solzimer%2Fsdbscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solzimer%2Fsdbscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solzimer%2Fsdbscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solzimer","download_url":"https://codeload.github.com/solzimer/sdbscan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solzimer%2Fsdbscan/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269794068,"owners_count":24476735,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["classification","cluster","clustering","dbscan","density","groups","multidimensional","noise","spatial","unidimensional"],"created_at":"2025-08-11T05:21:10.151Z","updated_at":"2025-08-11T05:21:14.520Z","avatar_url":"https://github.com/solzimer.png","language":"JavaScript","readme":"# sdbscan\n\nSuper fast density based spatial clustering [DBSCAN](https://en.wikipedia.org/wiki/DBSCAN) implementation for unidimiensional and multidimensional data. Works on nodejs and browser.\n\n## Installation\n```\nnpm install sdbscan\n```\n\n## Usage\n### NodeJS\n```javascript\nconst sdbscan = require(\"sdbscan\");\n\nvar data = [0, 1, 100, 101, 2, 102, 3, 104, 4, 103, 105, 5];\nvar res = sdbscan(data,2,3);\n```\n\n### Browser\n```html\n\u003c!doctype html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\t\u003cscript src=\"sdbscan.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\t\u003cscript\u003e\n\t\tvar data = [0,1,100,101,2,102,3,104,4,103,105,5];\n\t\tvar res = sdbscan(data,2,3);\n\n\t\tconsole.log(data);\n\t\tconsole.log(res);\n\t\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Results\n```javascript\n{\n\t\"noise\": [],\n\t\"clusters\": [\n    {\n      \"id\": 0,\n      \"data\": [5,4,3,2,1,0]\n    },\n    {\n      \"id\": 1,\n      \"data\": [105,103,104,102,101,100]\n    }\n  ]\n}\n```\n\n## API\n### sdbscan(data,epsilon,min)\nCalculates unidimiensional and multidimensional dbscan clustering on *data*. Parameters are:\n* **data** Unidimiensional or multidimensional array of values to be clustered. for unidimiensional data, takes the form of a simple array *[1,2,3.....,n]*. For multidimensional data, takes a\nNxM array *[[1,2],[2,3]....[n,m]]*\n* **epsilon** Maximum distance for two points to be considered in the same region.\n* **min** Minimal region size. If a region for a point is lesser than *min*, this point will be considered as noise (cannot be included in any group).\n\nThe function will return an object with the following data:\n* **noise** Points that cannot be added to any cluster.\n* **clusters** An array of clusters, with an ID and the data points belonging to it.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolzimer%2Fsdbscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolzimer%2Fsdbscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolzimer%2Fsdbscan/lists"}