{"id":30060323,"url":"https://github.com/tiaanduplessis/stat-fns","last_synced_at":"2025-08-08T01:43:55.690Z","repository":{"id":57369843,"uuid":"171476879","full_name":"tiaanduplessis/stat-fns","owner":"tiaanduplessis","description":"A statistics utility library","archived":false,"fork":false,"pushed_at":"2019-06-02T22:35:58.000Z","size":69,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-11T10:53:10.484Z","etag":null,"topics":["statistics","stats"],"latest_commit_sha":null,"homepage":null,"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/tiaanduplessis.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}},"created_at":"2019-02-19T13:18:45.000Z","updated_at":"2019-02-19T13:20:39.000Z","dependencies_parsed_at":"2022-09-09T15:12:24.155Z","dependency_job_id":null,"html_url":"https://github.com/tiaanduplessis/stat-fns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tiaanduplessis/stat-fns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fstat-fns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fstat-fns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fstat-fns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fstat-fns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiaanduplessis","download_url":"https://codeload.github.com/tiaanduplessis/stat-fns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fstat-fns/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269352248,"owners_count":24402672,"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-07T02:00:09.698Z","response_time":73,"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":["statistics","stats"],"created_at":"2025-08-08T01:43:50.451Z","updated_at":"2025-08-08T01:43:55.660Z","avatar_url":"https://github.com/tiaanduplessis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003cdiv center\u003e\n    \u003cimg width=\"65%\" src=\"./logo.svg\" alt=\"\" /\u003e\u003e\n\u003c/div\u003e\n\n\n[![package version](https://img.shields.io/npm/v/stat-fns.svg?style=flat-square)](https://npmjs.org/package/stat-fns)\n[![package downloads](https://img.shields.io/npm/dm/stat-fns.svg?style=flat-square)](https://npmjs.org/package/stat-fns)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![package license](https://img.shields.io/npm/l/stat-fns.svg?style=flat-square)](https://npmjs.org/package/stat-fns)\n[![make a pull request](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n\u003e A statistics utility library\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Install](#install)\n- [Usage](#usage)\n- [Docs](#docs)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\nThis project uses [node](https://nodejs.org) and [npm](https://www.npmjs.com). \n\n```sh\n$ npm install stat-fns\n$ # OR\n$ yarn add stat-fns\n```\n\n## Usage\n\n```js\nconst { Stat } = require('stat-fns')\n\nconst s = new Stat('65 72 68 64 60 55 73 71 52 63 61 74 69 67 74 50 4 75 67 62 66 80 64 65')\nconst s2 = new Stat('132 118 124 109 104 101 125 83 99 131 98 125 97 106 112 92 120 103 111 117 135 143 112 112 116 106 117 119 110 105 128 112 126 105 102')\n\nconsole.log('=== 1 ===\\n')\nconsole.log('mean', s.mean())\nconsole.log('max', s.max())\nconsole.log('min', s.min())\nconsole.log('sum', s.sum())\nconsole.log('range', s.range())\nconsole.log('Q1', s.Q1())\nconsole.log('Q2', s.Q2())\nconsole.log('Q3', s.Q3())\nconsole.log('IQR', s.IQR())\nconsole.log('Outliers', s.outliers())\n// === 1 ===\n// mean 63.375\n// max 80\n// min 4\n// sum 1521\n// range 76\n// Q1 61.25\n// Q2 65.5\n// Q3 71.75\n// IQR 10.5\n// Outliers [ 4 ]\n\nconsole.log('=== 2 ===\\n')\n\nconsole.log('mean', s2.mean())\nconsole.log('median', s2.median())\nconsole.log('mode', s2.mode())\nconsole.log('standard deviation', s2.standardDeviation())\nconsole.log('coefficient of variation', s2.cv())\nconsole.log('max', s2.max())\nconsole.log('min', s2.min())\nconsole.log(s2.classInterval(), s2.classWidth())\n// === 2 ===\n// mean 113\n// median 112\n// mode [ '112' ]\n// standard deviation 12.81293988791911\n// coefficient of variation 0.11338884856565584\n// max 143\n// min 83\n```\n\n## Docs\n\nWIP\n\n## Contribute\n\n1. Fork it and create your feature branch: `git checkout -b my-new-feature`\n2. Commit your changes: `git commit -am \"Add some feature\"`\n3. Push to the branch: `git push origin my-new-feature`\n4. Submit a pull request\n\n## License\n\nMIT\n    ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaanduplessis%2Fstat-fns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiaanduplessis%2Fstat-fns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaanduplessis%2Fstat-fns/lists"}