{"id":27079249,"url":"https://github.com/repeale/time-series-clustering","last_synced_at":"2025-04-06T01:34:03.625Z","repository":{"id":57147513,"uuid":"71942000","full_name":"repeale/time-series-clustering","owner":"repeale","description":"Time Series Based Clustering in JavaScript","archived":false,"fork":false,"pushed_at":"2016-10-27T21:51:36.000Z","size":29,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T02:42:52.655Z","etag":null,"topics":["timeser"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/repeale.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-25T21:49:49.000Z","updated_at":"2023-01-03T19:52:11.000Z","dependencies_parsed_at":"2022-09-06T15:00:58.774Z","dependency_job_id":null,"html_url":"https://github.com/repeale/time-series-clustering","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repeale%2Ftime-series-clustering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repeale%2Ftime-series-clustering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repeale%2Ftime-series-clustering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repeale%2Ftime-series-clustering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/repeale","download_url":"https://codeload.github.com/repeale/time-series-clustering/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423465,"owners_count":20936622,"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":["timeser"],"created_at":"2025-04-06T01:33:11.772Z","updated_at":"2025-04-06T01:34:03.601Z","avatar_url":"https://github.com/repeale.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Time Series Clustering\n\ntime-series-clustering allows you to find Time Series Based Clustering among your ordered data\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]\n\n### Install\n\n```sh\n$ npm install --save time-series-clustering\n```\n\n### Sample\n\nThis will give you a taste of what time-series-clustering does.\n\n```js\nvar getClusters = require('time-series-clustering');\n\nvar clusterConfig = {\n    // max time distance for two items to be in the same cluster\n    maxDistance: 60 * 60 * 24 * 1000 * 1, // 1 day\n    // filter cluster with a time frame smaller than minTimeFrame\n    minTimeFrame: 60 * 60 * 24 * 1000 * 1, // 1 day\n    // min number of items to get a relevant cluster\n    minRelevance: 10\n};\n\n// convertedData must contain UNIX timestamp in \"value\" fields ordered from the most recent to the oldest\nvar convertedData = {\n    \"data\": [{\n        \"id\": 0,\n        \"value\": 1477504545436\n    }, {\n        \"id\": 1,\n        \"value\": 1350777600000\n    }, {\n        \"id\": 2,\n        \"value\": 1350777600000\n    }, {\n        \"id\": 3,\n        \"value\": 1350777600000\n    }, {\n        \"id\": 4,\n        \"value\": 1350777600000\n    }, {\n        \"id\": 5,\n        \"value\": 1350691200000\n    }, {\n        \"id\": 6,\n        \"value\": 1350691200000\n    }, {\n        \"id\": 7,\n        \"value\": 1350691200000\n    }, {\n        \"id\": 8,\n        \"value\": 1350691200000\n    }, {\n        \"id\": 9,\n        \"value\": 1350691200000\n    }, {\n        \"id\": 10,\n        \"value\": 1350691200000\n    }, {\n        \"id\": 11,\n        \"value\": 1350691200000\n    }, {\n        \"id\": 12,\n        \"value\": 1350691200000\n    }, {\n        \"id\": 13,\n        \"value\": 1337126400000\n    }]\n};\n\nconsole.log(getClusters(convertedData, clusterConfig));\n\n// RETURNED OBJECT -\u003e ARRAY OF CLUSTERS\n/*\n    {\n        \"clusters\": [{\n            \"value_max\": 1350777600000,\n            \"value_min\": 1350691200000,\n            \"value_range\": 1,\n            \"relevance\": 12,\n            \"ids\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n        }]\n    }\n*/\n```\n\n## License\n\n[The MIT License](LICENSE) - © [Alessio Enrico Repetti]  (https://github.com/repeale)\n\n[npm-url]: https://npmjs.org/package/time-series-clustering\n[downloads-image]: http://img.shields.io/npm/dm/time-series-clustering.svg\n[npm-image]: http://img.shields.io/npm/v/time-series-clustering.svg\n[travis-url]: https://travis-ci.org/repeale/time-series-clustering\n[travis-image]: http://img.shields.io/travis/repeale/time-series-clustering.svg\n[david-dm-url]:https://david-dm.org/repeale/time-series-clustering\n[david-dm-image]:https://david-dm.org/repeale/time-series-clustering.svg\n[david-dm-dev-url]:https://david-dm.org/repeale/time-series-clustering#info=devDependencies\n[david-dm-dev-image]:https://david-dm.org/repeale/time-series-clustering/dev-status.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepeale%2Ftime-series-clustering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frepeale%2Ftime-series-clustering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepeale%2Ftime-series-clustering/lists"}