{"name":"summary","description":"Takes an array of numbers and calculates some descriptive statistics","version":"2.1.0","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./summary.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/summary.git"},"keywords":["summary","sort","size","mode","mean","quartile","median","variance","sd"],"devDependencies":{"tap":"~14.0.0"},"license":"MIT","gitHead":"84f4956c14166c50989b43b607586b4cb1d32767","bugs":{"url":"https://github.com/AndreasMadsen/summary/issues"},"homepage":"https://github.com/AndreasMadsen/summary#readme","_id":"summary@2.1.0","_nodeVersion":"13.12.1-pre","_npmVersion":"6.14.4","dist":{"integrity":"sha512-nMIjMrd5Z2nuB2RZCKJfFMjgS3fygbeyGk9PxPPaJR1RIcyN9yn4A63Isovzm3ZtQuEkLBVgMdPup8UeLH7aQw==","shasum":"be8a49a0aa34eb6ceea56042cae88f8add4b0885","tarball":"http://registry-npm.ywwl.com/summary/download/summary-2.1.0.tgz","fileCount":5,"unpackedSize":13619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUgUHCRA9TVsSAnZWagAAx8QQAImGbiflE0OiM71eTpuv\nDCOM/ut12kXitmq+cQpymSb28lV9Pqdco/xVnBwZrWELm0Is0TH7eT6dSvPs\nUgv+vCw/7aerKBce5aUF1+kytqJ/9PLjp90SHBlUfhBZt0XdFVqt5HpsT5FF\n49AEOya1Hh4hWJfnsu4NELNTftbb2WKYTofqOdjBVq3AzmkVeWrsjWgsT79/\npOf8qHoOlsaprVatQbqkX72b0CcsoOPBZTxaFcvGABv/El5WTPbeYQrM7HPg\nGHgoKc9LcRQb6KlX3TyxjulT0u6GFG7B9pgwIwfQ+Eku8F9zJoOSKdxstNo9\n2VGzfRrgO2KUMP0yFkkJOmmB4kj0g9M1h3KbbSuWxS7bZ4x9yF8onmzM9hct\nH9dSl5XqK096eT6V2w5zAK9Bt+XGxkKDrDWnIJ7h0EdOWjlCzVPTAUkjBFXb\nBI2eChvlFP906B4wLROwmyo0YVn70t7OEcpf2bYZr91NbJqsV4NeEQvwVnWT\nR26b+iV/YnpZCxHPEdUScUUk1V1WNVfPN1gqYTMDLVlNE1lwSCTlexzj3pXZ\nqLPQ+w7z4bvKmfCyJSozhebRUBMt4bPFAH6ZLXYmvX+M55uhJtP5v2yzog1y\nhx+VfhCO3naASqj2w1S1V5a9ZUkwg8WPRjXNbTVzNGaLo76aSiMuHHQS/Dg/\nM/1g\r\n=fHZK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG5DokQgJaKm6ToTwi4NTMc+RZFeaBPb8bjd93aROr8kAiAeksQq4YDMt61LAOPacLbt+vc+3+vZTzEg6xh7Qno+aA=="}],"size":3761,"noattachment":false,"key":"/summary/-/summary-2.1.0.tgz"},"maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"}],"_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/summary_2.1.0_1599210759568_0.0963929420659202"},"_hasShrinkwrap":false,"readme":"# summary\n\n> Takes an array of numbers and calculates some descriptive statistics\n\n## Installation\n\n```sheel\nnpm install summary\n```\n\n## Example\n\n```javascript\nvar summary = require('summary');\n\nvar data = summary([-1, 0, 1], true /* sorted */);\nconsole.log(data.variance()); // 1\nconsole.log(data.mean()); // 0\n```\n\n## Documentation\n\nThe `summary` constructor, takes a required `data` array and and optional\nboolean indication whether or not the `data` is `sorted` from small to big,\nby default `sorted` is `false`.\n\n```javascript\n// Data is sorted from small to big\nvar data = summary([-1, 0, 1], true);\n\n// Data is sorted, but summary dosn't know. Works fine just a bit slower.\nvar data = summary([-1, 0, 1] /*, default false */);\n\n// Data is sorted in reverse order\nvar data = summary([1, 0, -1] /*, default false */);\n\n// Data isn't sorted\nvar data = summary([0, 1, -1] /*, default false */);\n```\n\nThe data object has the following metods, note that almost all values is lazy\ncalculated and then cached.\n\n```javascript\ndata.data(); // Returns the original array\n\ndata.sort(); // Returns the sorted array\n\ndata.size(); // Returns the data length\n\ndata.sum(); // Returns the data sum\n\ndata.mode(); // Returns mode\n\ndata.mean(); // Returns the mean\n\ndata.quartile(0.25); // Returns 25% quartile\n\ndata.median(); // Returns the median\n\ndata.variance(); // Returns the variance\n\ndata.sd(); // Returns the standard deviation\n\ndata.max(); // Returns the maximum value\ndata.min(); // Returns the minimum value\n```\n\n## License\n\n**The software is license under \"MIT\"**\n\n> Copyright (c) 2013 Andreas Madsen\n>\n> Permission is hereby granted, free of charge, to any person obtaining a copy\n> of this software and associated documentation files (the \"Software\"), to deal\n> in the Software without restriction, including without limitation the rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> The above copyright notice and this permission notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n","publish_time":1599210759713,"_cnpm_publish_time":1599210759713,"dist-tags":{"latest":"2.1.0"}}