{"id":17047670,"url":"https://github.com/residentmario/threshold-tree","last_synced_at":"2026-04-20T05:30:58.627Z","repository":{"id":66134390,"uuid":"78386571","full_name":"ResidentMario/threshold-tree","owner":"ResidentMario","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-13T00:35:58.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-22T21:32:21.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ResidentMario.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-09T02:29:38.000Z","updated_at":"2017-01-26T19:42:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"e3710f71-f8e2-488a-9d22-499bf21f8e2e","html_url":"https://github.com/ResidentMario/threshold-tree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ResidentMario/threshold-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResidentMario%2Fthreshold-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResidentMario%2Fthreshold-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResidentMario%2Fthreshold-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResidentMario%2Fthreshold-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ResidentMario","download_url":"https://codeload.github.com/ResidentMario/threshold-tree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResidentMario%2Fthreshold-tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32034515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":[],"created_at":"2024-10-14T09:50:00.453Z","updated_at":"2026-04-20T05:30:58.586Z","avatar_url":"https://github.com/ResidentMario.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# threshold-tree\n\nThis is a small module which exports a `ThresholdTree` object. A threshold tree as it is refered to here is a type of [tree data structure](https://en.wikipedia.org/wiki/Tree_(data_structure)) which collects children of a parent node which constitute less than some `threshold%` of the total `n` of that node into an `Other` child node and constituent subtree.\n\nSince this bit of code was written for `d3-log-treemap` (forthcoming), a `d3` visual data display project, `ThresholdTree` is an object construct which accepts two parameters: `data`, a data object as outputted by e.g. `d3.csvParse(csvString)`, and `threshold`, the ratio of the parent node's total entries each child node must have to preserve independence.\n\n## Installation\n\nTo get this for [Node.JS](https://nodejs.org/en/):\n\n`npm install threshold-tree`\n\nTo build a bundle for front-end using [browserify](http://browserify.org/) run e.g.:\n\n`browserify threshold-tree.js -o umd/threshold-tree.js --standalone tree`\n\nThe CDN link (via [unpkg](https://unpkg.com/)) is:\n\n`https://unpkg.com/threshold-tree@[VERSION]/umd/threshold-tree`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresidentmario%2Fthreshold-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresidentmario%2Fthreshold-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresidentmario%2Fthreshold-tree/lists"}