{"_id":"moving-average","_rev":"24-2968139cf885a76d1d8da187db31f407","name":"moving-average","description":"Exponential Moving Average","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"moving-average","version":"0.0.1","description":"Moving Average","main":"index.js","scripts":{"test":"node tests/moving_average.js"},"repository":{"type":"git","url":"git@github.com:pgte/moving-average.git"},"devDependencies":{"tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"pgte"},"license":"MIT","_id":"moving-average@0.0.1","dist":{"shasum":"a450baabed3e6421c87c9fda809abe461c820461","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-0.0.1.tgz","integrity":"sha512-EeL3iBFsbSr9TK1dBsMxZ60aE0/zohcsQKjve5WnvQQzv+DbNxbHckalRk/TlIoeyVGU2eBK69AwrWEC7C1s1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPbpI3S3mqGOYXYJk6CqKoIInwi72oZavHmrsb5UHvFAiA3HaezykdbPV8QH3ZOqR86QwNoQngcYvc/zi02uDCwwA=="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"pgte","email":"pedro.teixeira@gmail.com"},"maintainers":[{"name":"pgte","email":"pedro.teixeira@gmail.com"}],"directories":{}},"0.0.2":{"name":"moving-average","version":"0.0.2","description":"Moving Average","main":"index.js","scripts":{"test":"node tests/moving_average.js"},"repository":{"type":"git","url":"git@github.com:pgte/moving-average.git"},"devDependencies":{"tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"pgte"},"license":"MIT","_id":"moving-average@0.0.2","dist":{"shasum":"ea81263b22bcdefdd0d5deb0f4f85a1129826d37","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-0.0.2.tgz","integrity":"sha512-Oq7R9UBIRHuaHnbXOzOJfrxqhqBafv1F7555Y7wEpcHE4BVTIBdd2E/A/uk5CFSQwxcXjSAYVFiZaufKTBKgMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEhVkruy8hvc2V6FRY3jihMJ2l3j81jkosgACDOpn2mOAiAzxVoptwxUEq9EA2sctLjDMzigGku6O4yi0PTnWuL+4w=="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"pgte","email":"pedro.teixeira@gmail.com"},"maintainers":[{"name":"pgte","email":"pedro.teixeira@gmail.com"}],"directories":{}},"0.0.3":{"name":"moving-average","version":"0.0.3","description":"Moving Average","main":"index.js","scripts":{"test":"node tests/moving_average.js"},"repository":{"type":"git","url":"git@github.com:pgte/moving-average.git"},"devDependencies":{"tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"pgte"},"license":"MIT","_id":"moving-average@0.0.3","dist":{"shasum":"c8930478715721fd45d7dbc8379087e5033e9d6b","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-0.0.3.tgz","integrity":"sha512-FntBNkBUEdDflP0HfSuxOBkg0Um5i4G5mFMivbG/f2wAo3Np/Ep8HXxlc4Jh/ofJ3Bsia5X7+sSJqnpS8l3B6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEwCEDE8c43kr/12KMmYjWS66lDUfpmtULX6jgbRKBqQIgeU6hjrrYEaqm0koofrQjrDDTewfUmu7pNn1Cutotd5A="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"pgte","email":"pedro.teixeira@gmail.com"},"maintainers":[{"name":"pgte","email":"pedro.teixeira@gmail.com"}],"directories":{}},"0.0.4":{"name":"moving-average","version":"0.0.4","description":"Exponential Moving Average","main":"index.js","scripts":{"test":"node tests/moving_average.js"},"repository":{"type":"git","url":"git@github.com:pgte/moving-average.git"},"devDependencies":{"tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"pgte"},"license":"MIT","_id":"moving-average@0.0.4","dist":{"shasum":"2db7a55a7718d1b6af22971255e9bec93a226157","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-0.0.4.tgz","integrity":"sha512-khMk0m94C7UCayXVnFKK3cNa0/g9rr5BDq1+4HgG7mF356hzEeGv5lTePuXG510aO6qYvykJklFFRnze2aSRJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFuBKpQA0xohdq2FspPvxEMt8w0EyjF1JnenIsZaWH1uAiA1Wp3zJp2f0Mmsf3Pph1v9D+NpXiM+MKxuOmrrbOxnBw=="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"pgte","email":"pedro.teixeira@gmail.com"},"maintainers":[{"name":"pgte","email":"pedro.teixeira@gmail.com"}],"directories":{}},"0.0.5":{"name":"moving-average","version":"0.0.5","description":"Exponential Moving Average","main":"index.js","scripts":{"test":"node tests/moving_average.js"},"repository":{"type":"git","url":"git@github.com:pgte/moving-average.git"},"devDependencies":{"tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"pgte"},"license":"MIT","bugs":{"url":"https://github.com/pgte/moving-average/issues"},"homepage":"https://github.com/pgte/moving-average","_id":"moving-average@0.0.5","dist":{"shasum":"d808020706dd24268d45999c68191a53048aeb27","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-0.0.5.tgz","integrity":"sha512-TOq2GN4XgBASjQ43K30eVMFZeXDMjQpUcjIyEKq3kaJAfa7oUU6EWHV6Jig1rJUscfqPowhX7/6Asw3M3o2dOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqNIPnewXJXW1OLzKxs9qWPL2ulRcLWsM3bTaZ1jVaBAIhAIKeHHBVwPYEJKlzQ5k7hV9WOKWDH37Bpb2AKQsirnSP"}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"pgte","email":"pedro.teixeira@gmail.com"},"maintainers":[{"name":"pgte","email":"pedro.teixeira@gmail.com"}],"directories":{}},"0.1.0":{"name":"moving-average","version":"0.1.0","description":"Exponential Moving Average","main":"index.js","scripts":{"test":"node tests/moving_average.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/pgte/moving-average.git"},"devDependencies":{"tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"pgte"},"license":"MIT","gitHead":"cd254238ef63b4226374f840185750240d8d02bc","bugs":{"url":"https://github.com/pgte/moving-average/issues"},"homepage":"https://github.com/pgte/moving-average#readme","_id":"moving-average@0.1.0","_shasum":"5d8a794a07471754a702514712355700d1d19f33","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"pgte","email":"pedro.teixeira@gmail.com"},"maintainers":[{"name":"pgte","email":"pedro.teixeira@gmail.com"}],"dist":{"shasum":"5d8a794a07471754a702514712355700d1d19f33","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-0.1.0.tgz","integrity":"sha512-GPGXwidy4jLTX4VOjIqj5dON1I8GnQsYBXw1zpfaSHk9jWY85F5afjY9GBgQ69i7uQvHvNY7+SjveBPAmKbKVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDGh8TlhpepW0BlEB/iYqIFbbtFP/CGNc4Bv5aYcFuNrAiEAmldW4WYKreCSQ/N035mLM+/ZBCNMQwTEeUXIExdwlNc="}]},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/moving-average-0.1.0.tgz_1454967216943_0.391462646657601"},"directories":{}},"0.1.1":{"name":"moving-average","version":"0.1.1","description":"Exponential Moving Average","main":"index.js","scripts":{"test":"node tests/moving_average.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/pgte/moving-average.git"},"devDependencies":{"tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"pgte"},"license":"MIT","gitHead":"a3083ee12a0e76775299c346e7fa1043203ffd1a","bugs":{"url":"https://github.com/pgte/moving-average/issues"},"homepage":"https://github.com/pgte/moving-average#readme","_id":"moving-average@0.1.1","_shasum":"9b19c376978e21b945ed777678ed954d4b7b5475","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"pgte","email":"pedro.teixeira@gmail.com"},"maintainers":[{"name":"pgte","email":"pedro.teixeira@gmail.com"}],"dist":{"shasum":"9b19c376978e21b945ed777678ed954d4b7b5475","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-0.1.1.tgz","integrity":"sha512-vNYvjqlvc8UonL89Xo10RDwZ9Xyf+Y6xEkVMDP8hxBHf8oCIbpQ3LgKUBPwIyFqUC/Jh/6SGOZSoCHNcwYYd0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFNykcxrGyPXkXT0/YLHZgwxlPzTnR2S9lG/3pRh/yL7AiEA8+TX7L2gnX+NnOB4lP4HV3bgU8F/4zID3eXBl8ktfqU="}]},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/moving-average-0.1.1.tgz_1455527588261_0.06854660133831203"},"directories":{}},"0.2.0":{"name":"moving-average","version":"0.2.0","description":"Exponential Moving Average","main":"index.js","scripts":{"test":"npm run lint && npm run test:node","test:node":"node tests/moving_average.js","lint":"standard"},"repository":{"type":"git","url":"git+ssh://git@github.com/pgte/moving-average.git"},"devDependencies":{"standard":"^10.0.3","tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"pgte"},"license":"MIT","gitHead":"0c6169bc18da0519891082250378e1604daa368e","bugs":{"url":"https://github.com/pgte/moving-average/issues"},"homepage":"https://github.com/pgte/moving-average#readme","_id":"moving-average@0.2.0","_npmVersion":"5.4.1","_nodeVersion":"8.0.0","_npmUser":{"name":"pgte","email":"i@pgte.me"},"dist":{"integrity":"sha512-rr1k5Jo7QYpmQ/1ACi6iTyvL+zuvlTpynVnfjT/WC6BA33Qp3ntmlVggDg3oE3BWdhpdpSbyO+tUIIXy4CSqtw==","shasum":"cc70753036cf601420566988e25be894866ecb70","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-0.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICTOXCdhQh6Lscx6n1xAsIS6w0IVYmzGNRRhgujz07L7AiEA6wYNXlxFCPHly94824sHibfXZdyRgMv9EF2asZNoUcA="}]},"maintainers":[{"name":"pgte","email":"pedro.teixeira@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/moving-average-0.2.0.tgz_1507209935850_0.8694289133418351"},"directories":{}},"1.0.0":{"name":"moving-average","version":"1.0.0","description":"Exponential Moving Average","main":"index.js","scripts":{"test":"npm run lint && npm run test:node","test:node":"node tests/moving_average.js","lint":"standard"},"repository":{"type":"git","url":"git+ssh://git@github.com/pgte/moving-average.git"},"devDependencies":{"standard":"^10.0.3","tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"Pedro Teixeira","email":"i@pgte.me"},"contributors":[{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"John Meisner","email":"jhn_msnr@yahoo.com"},{"name":"Max Kutny","email":"https://github.com/mkutny"}],"license":"MIT","gitHead":"4cdb67ee782e5731a28e58fbd9f87a82168f34cd","bugs":{"url":"https://github.com/pgte/moving-average/issues"},"homepage":"https://github.com/pgte/moving-average#readme","_id":"moving-average@1.0.0","_npmVersion":"5.4.1","_nodeVersion":"8.0.0","_npmUser":{"name":"pgte","email":"i@pgte.me"},"dist":{"integrity":"sha512-97cgMz0U2zciiDp4xRl/n+MYgrm9l7UiYbtsBLPr0rhw6KH3m4LyK2w4d96V6+UwKo+ph7KtQSoL2qgnqZVgvA==","shasum":"b1247ba8dd2d7927c619f1eac8036cf933d65adc","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJ/Z44q/jMm5B8acoyN9EteZdaWBKgL1qixY1fUzAoGAiEA49tTLa6LLRWVF8tR1cEdJQM/glk+Foro4vnLGY1hoyA="}]},"maintainers":[{"name":"pgte","email":"pedro.teixeira@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/moving-average-1.0.0.tgz_1507626864256_0.3444156125187874"},"directories":{}},"1.0.1":{"name":"moving-average","version":"1.0.1","description":"Exponential Moving Average","main":"index.js","types":"index.d.ts","scripts":{"test":"npm run lint && npm run test:node","test:node":"node tests/moving_average.js","lint":"standard"},"repository":{"type":"git","url":"git+ssh://git@github.com/pgte/moving-average.git"},"devDependencies":{"standard":"^10.0.3","tap":"*"},"keywords":["moving","average","average","statistics"],"author":{"name":"Pedro Teixeira","email":"i@pgte.me"},"contributors":[{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"John Meisner","email":"jhn_msnr@yahoo.com"},{"name":"Max Kutny","email":"https://github.com/mkutny"}],"license":"MIT","gitHead":"967c5d0259759cbe9cfafff43ada73833a08bf0c","bugs":{"url":"https://github.com/pgte/moving-average/issues"},"homepage":"https://github.com/pgte/moving-average#readme","_id":"moving-average@1.0.1","_nodeVersion":"15.4.0","_npmVersion":"7.0.15","dist":{"integrity":"sha512-Hl3aUJqu/7LMslHM6mz9Sk1mpFwe4jW5QcmJgukcUGFILBcQW5L9ot8BUVRSuUaW3o/1Twrwmu7w2NTGvw76cA==","shasum":"84f288b5d9dbd7f4e0411862a88430a30dd8d3e3","tarball":"https://registry.npmjs.org/moving-average/-/moving-average-1.0.1.tgz","fileCount":6,"unpackedSize":5541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRyVyCRA9TVsSAnZWagAALswP/inYzHoA5N6/Y99kQ9+w\nqQsNqJRyo5mqwQHq5RcQvY2x4B2tyzT2r6/6mRbdyOhJNoK0ilUAjCWbqxQj\nbGs/VUVGq/O8PbedVdhgYOjBAWvbtcLQ6NaKc/JgZ3l/ZkRjb7ElXsMjJlZ7\nlBRW3fVb7XUl3qIuF83j9ZP4UdQu1117fIftnw3V/iX+mbE867DutUjwvXgh\nAqNRUwRts46BxvD12qzYLI3mRPXkLhO9YL2JCfEVER2t1iw8dj2HGRFou4OM\nqh9MIdP3JJWKv9wFH+BdDNyC7VGTBGCVTs9m4rpds1SHbYzgSZdsMczUFB3Y\nWfX0nQgUBkSfPhX6uFq12iMszXHTcuJv+py8LHyp7kOOjx2ys1r9cCyfasxW\nfjn0Tocfrdain2aTtsUN1cfve8F2yubVmtHLBY0c2yg9Opx12gXI5gsa3t5g\nDLLdeOr8aSXzmq4pSEZlIj+QvdIu9GDbN4u/sFYrL40D76zyau0UxgIE4Cjl\nFMt+DKt/pXMLNVyo5QSCGJdvvd3Yfx85WsbiEVJWuiqK48A0LN/fzpaYnrNk\nF0bOaZxs0GqgYVDdOllXdZxoE16dzjA85+J5uli4lsBUD8lD/9U4/WLpiXMm\n5+zMJ3oieKQnOTBlMrrcr84c1uxYgUoD3jk1dsfOXG9JSIyXCv8WQlhbLqev\n2aeD\r\n=E1fw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6MwR4ToFXLXJTjdyBPJHUOyDBeHMNfXRjDDIvJogxvgIhAM6sATgVXCrPb/nlx76y+Uy9Lh6IRCoXxgOOSW1Ub+ed"}]},"_npmUser":{"name":"pgte","email":"i@pgte.me"},"directories":{},"maintainers":[{"name":"pgte","email":"i@pgte.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/moving-average_1.0.1_1615275377611_0.3684291296182678"},"_hasShrinkwrap":false}},"readme":"# moving-average\n\n[![Build Status](https://travis-ci.org/pgte/moving-average.svg?branch=master)](https://travis-ci.org/pgte/moving-average)\n\nOnline calculation of Exponential Moving Average for Node.js.\n\nAlso suports Moving Variance, Moving Deviation and Forecast.\n\nThe [following](https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average) online algorithm is implemented:\n\n```\ndiff := x - mean\nincr := alpha * diff\nmean := mean + incr\nvariance := (1 - alpha) * (variance + diff * incr)\nforecast := mean + alpha * diff\n```\n\n## Install\n\n```bash\n$ npm install moving-average\n```\n\n## Use\n\n```javascript\nvar timeInterval = 5 * 60 * 1000; // 5 minutes\n\nvar MA = require('moving-average');\nvar ma = MA(timeInterval);\n\nsetInterval(function() {\n  ma.push(Date.now(), Math.random() * 500);\n  console.log('moving average now is', ma.movingAverage());\n  console.log('moving variance now is', ma.variance());\n  console.log('moving deviation now is', ma.deviation());\n  console.log('forecast is', ma.forecast());\n});\n```\n\n## License\n\nMIT\n","maintainers":[{"name":"pgte","email":"i@pgte.me"}],"time":{"modified":"2022-06-20T10:33:36.483Z","created":"2013-03-21T15:43:14.638Z","0.0.1":"2013-03-21T15:43:17.313Z","0.0.2":"2013-03-21T15:47:51.145Z","0.0.3":"2013-03-21T15:49:36.556Z","0.0.4":"2013-03-21T17:08:38.831Z","0.0.5":"2014-05-02T22:59:48.287Z","0.1.0":"2016-02-08T21:33:39.747Z","0.1.1":"2016-02-15T09:13:13.012Z","0.2.0":"2017-10-05T13:25:36.797Z","1.0.0":"2017-10-10T09:14:25.215Z","1.0.1":"2021-03-09T07:36:17.745Z"},"author":{"name":"Pedro Teixeira","email":"i@pgte.me"},"repository":{"type":"git","url":"git+ssh://git@github.com/pgte/moving-average.git"},"keywords":["moving","average","average","statistics"],"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/pgte/moving-average#readme","bugs":{"url":"https://github.com/pgte/moving-average/issues"},"users":{"sandinmyjoints":true,"craigpatten":true,"undisclosed":true},"contributors":[{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"John Meisner","email":"jhn_msnr@yahoo.com"},{"name":"Max Kutny","email":"https://github.com/mkutny"}]}