{"name":"summary","description":"Takes an array of numbers and calculates some descriptive statistics","version":"0.3.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":"0.4.x"},"license":"MIT","engines":{"node":"0.10","npm":"1"},"bugs":{"url":"https://github.com/AndreasMadsen/summary/issues"},"_id":"summary@0.3.0","dist":{"shasum":"00213e06e9a48a16d019f1caaebce9b4b6ed13b7","tarball":"http://registry-npm.ywwl.com/summary/download/summary-0.3.0.tgz","integrity":"sha512-vmCoulLNt72W5w6oAS5skDYeZtbph3dPyqu0z6CBg5/bJmVt9HG/hqRApfbRbF9o1hsffW+8xTSu0mKSj+8nyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGvzaRqMkmM4rbFHcg0dbxaDT0CPJDA11zY+rn2yaWdgIhAI5zwIUO79oNWsZc+iQ0y8ZCFbjX7h0m9G4g9ac9L9gR"}],"size":3174,"noattachment":false,"key":"/summary/-/summary-0.3.0.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"}],"directories":{},"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":1374676512827,"_cnpm_publish_time":1374676512827,"dist-tags":{"latest":"2.1.0"}}