{"_id":"@andrewshell/okay-recs","_rev":"2-1075b228f60a782b078671265d05445d","name":"@andrewshell/okay-recs","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@andrewshell/okay-recs","version":"0.1.0","description":"An okay way to find user recommendations and similar users","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/andrewshell/okay-recs.git"},"keywords":["recommendation","engine"],"author":{"name":"Andrew Shell","email":"andrew@andrewshell.org"},"license":"MIT","bugs":{"url":"https://github.com/andrewshell/okay-recs/issues"},"homepage":"https://github.com/andrewshell/okay-recs#readme","directories":{"example":"example"},"gitHead":"ae2c879c638c48780c7260ad58350b8ca3b07f6a","_id":"@andrewshell/okay-recs@0.1.0","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-rUANJrKNr6mk3oQUvB4sko3PMHvpNtVi/e+xEgjoOrsaMxeEZP4xzSyfWX3IyMUvDGhXpPSL1kPoGYfNeuez7g==","shasum":"dafe8b1af04ce85e7e521e256402a13332f904a5","tarball":"https://registry.npmjs.org/@andrewshell/okay-recs/-/okay-recs-0.1.0.tgz","fileCount":8,"unpackedSize":35505552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoF2eCRA9TVsSAnZWagAAowQP/Rd/i7eyzYtKtlkKn2Mt\n696OwvBaTFOTUty+9VhyzDhSaVM4JsKZ9EsA6+KntdAgr6REi4cqz8O1IgXy\n/N35HnRCkjxeLZ0/w1MEw23ypANEON2B2TlW2p/rLRJgkRJXNCyfhtLcWBcV\nHZdWHx/JV5APRPoeQSaLKhdM8cvKxfxq0adUNNo26aatG6UR2nhtXRifu9mw\nNt/6Hr3XmpWfQJE3bjyCZ0+Y2iheuyDT1Ng+JGBIu/miNOGM8trjMNmRjaeX\n1xjsNvaGSjnkNrSKPohY/nOcUTxmcHXjdU7I9/vblvYWKqBwHW5UcAhgS2uE\ntWsi6U+c3h19c/6sHpmO0G03kvLepevyxqoaEtHKkX4NFU+jklMhgoSgo05y\nqCE4qoT8NtZ9R3Rg41MRplECR49BxDdK8stwRdpvL4fdj2TU7L5Pa8gmkB2c\n+k8c6YxmZbjGeqkthYPkM5a+Ci3u3Ey4XY0LX5dj35BOPvy7RwK73ug+w9Ew\nLNxX89q3odoLWG/7qoCmxHTdgDbMzTr9d964faxSQyXAsTBZvmGF3GKMf3nC\nIK4hTYHLiYEGe6hmbrV1rO5R5zT2HUkX+v1APgNKpjRd9BXI9BptmJ8gBZkH\n4k0ZJgItph+oxYM5T5NLFoDgfvMOO8MQFj60fDO5cOiL8yQj5SXQLldX6tZa\n/oAy\r\n=cPTF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAL7++2NCq4EtbO9JAlXp+4wsxFUiEpM+BUuJTAmVhWmAiEAyV807Bd3HbCXaZKnSz8msPar/87YQ0SbXdSo4EkIN+E="}]},"maintainers":[{"name":"andrewshell","email":"andrew@andrewshell.org"}],"_npmUser":{"name":"andrewshell","email":"andrew@andrewshell.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/okay-recs_0.1.0_1604345246116_0.1872677668935816"},"_hasShrinkwrap":false},"0.2.0":{"name":"@andrewshell/okay-recs","version":"0.2.0","description":"An okay way to find user recommendations and similar users","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/andrewshell/okay-recs.git"},"keywords":["recommendation","engine"],"author":{"name":"Andrew Shell","email":"andrew@andrewshell.org"},"license":"MIT","bugs":{"url":"https://github.com/andrewshell/okay-recs/issues"},"homepage":"https://github.com/andrewshell/okay-recs#readme","directories":{"example":"example"},"gitHead":"b02d9f75552f0b69fdda69229362e3e4352bdb0d","_id":"@andrewshell/okay-recs@0.2.0","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-zI4u2TTJfsKgfOUEBjmvyxLVopT9M4vxnqSALG3F2j6fuIC2bZSUV7Cb6WGMAcRVf6Ae/j+rlt3roz7n97nJ1A==","shasum":"ff7e7551f97910d129d5fa5026202fd61ca78c8a","tarball":"https://registry.npmjs.org/@andrewshell/okay-recs/-/okay-recs-0.2.0.tgz","fileCount":8,"unpackedSize":35506298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoGsuCRA9TVsSAnZWagAAWIoP/imD0iw4p/X7TnOpZK5S\niO62ONC6fQTJ19rw56Wf0GwyHk6q/9Air2xvGLxSln+YB6Bx9+GJTpNrz/OI\nRze4QhPAxNHnPLC4fwSBW8PfvsYpvMl4nox9qM4c2fKFvqTYuKV4FWsXMxKT\nOHrLlrj/wrhvqcBCpGKiAesA31pbN84DHfza4l1yHVE09mmqpl78MUvEnuYk\nzRnNVVAhy4/vhoncOqRrPN2EcZc/WG6vexi+NaR8PgRoatMhaHoWCTOcts8Q\nJz24giLIodrx+fWkVU3/X10XSLHDsxi9X2b9WkN2eiXpTylMzTUlwrGQx2SG\nZliWeUkFXTWwsFsqZHS4xW0xNTuPLxnEjn8c5VXVspk4Yq1t4ZSd/YxRkTuG\nnFn1K4pvP2SSskRN347OwtEjYsxSeD9tZPnkyDuucRagQPIjXno81KtlEqC6\nXfnXJcqG8J0GHcUZs5GmR4IC26MHM4/SW5r7MGwVsKFOe9jyswXh28VCCR66\nKFpP9Ap2AkpUWy+3udcj2J8GRlwc+LMBMkNYzMauI+zRsZAIEXg+le3BTOHa\nbiib48wJvlTrojjx7M/bINSUxhYyTjOH+ILmu3WphYrR+9XOG588L4FbIogz\ncdYonuwkPCCzk4hOgixqowjlZe5ijM13nvQ5D90ikfIYdN+Ey8uCLVwUhxYm\npLF9\r\n=xgmY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgvNOO9MyWSxmhb83Zff1WNZornf/AmB+VmOyVFOVWzAiEAhglGOZ7VesbJ+IYLYeGxxogFIN6u85b/F6Ge7yfwYhU="}]},"maintainers":[{"name":"andrewshell","email":"andrew@andrewshell.org"}],"_npmUser":{"name":"andrewshell","email":"andrew@andrewshell.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/okay-recs_0.2.0_1604348718375_0.27692957808676155"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-02T19:27:26.069Z","0.1.0":"2020-11-02T19:27:26.323Z","modified":"2022-04-04T14:01:55.927Z","0.2.0":"2020-11-02T20:25:18.553Z"},"maintainers":[{"name":"andrewshell","email":"andrew@andrewshell.org"}],"description":"An okay way to find user recommendations and similar users","homepage":"https://github.com/andrewshell/okay-recs#readme","keywords":["recommendation","engine"],"repository":{"type":"git","url":"git+https://github.com/andrewshell/okay-recs.git"},"author":{"name":"Andrew Shell","email":"andrew@andrewshell.org"},"bugs":{"url":"https://github.com/andrewshell/okay-recs/issues"},"license":"MIT","readme":"# Okay Recommendations\n\n[![NPM](https://nodei.co/npm/@andrewshell/okay-recs.png)](https://nodei.co/npm/@andrewshell/okay-recs/)\n\n## User Recommendations\n\nTakes a structure of users and what they've rated various programs and find\na list of other programs they might like based on similar ratings.\n\nRating is the average (mean) score of people who rated movies similar to you.\nConfidence is the number of users that contributed to that rating.\n\n## Similar Users\n\nTakes a structure of users and what they've rated various programs and find\na list of other users with similar ratings.\n\nRating is the sum of scores (2 points for exact match, 1 point for close match)\nConfidence is the number of program matches that contributed to that rating.\n\n## Example:\n\nThere is a full example in example folder.\n\n```js\nconst okayRecs = require('@andrewshell/okay-recs');\n\n// Source of all user ratings in system.\nconst allUserRatings = {\n    \"user0\": {\n        \"https://www.metacritic.com/tv/112263\": 1,\n        \"https://www.metacritic.com/tv/24\": 4,\n        \"https://www.metacritic.com/tv/30-rock\": 3,\n        \"https://www.metacritic.com/tv/alias\": 2,\n        \"https://www.metacritic.com/tv/archer\": 2,\n        \"https://www.metacritic.com/tv/arrested-development\": 2,\n        \"https://www.metacritic.com/tv/band-of-brothers\": 3,\n        ...\n    },\n    \"user1\": {\n        \"https://www.metacritic.com/tv/3rd-rock-from-the-sun\": 2,\n        \"https://www.metacritic.com/tv/adventure-time\": 4,\n        \"https://www.metacritic.com/tv/archer\": 1,\n        \"https://www.metacritic.com/tv/arrested-development\": 3,\n        \"https://www.metacritic.com/tv/better-call-saul\": 4\n        ...\n    },\n    ...\n};\n\n// Subset of user ratings that you want recommendations and similar users for.\n// Note: This example shows one user, but can work for multiple users at once.\nconst subUserRatings = {\n    user10: allUserRatings['user10']\n};\n\n// Sum of scores of people who gave program 1 a rating of x gave to program 2\n// Intermediate structure for user recommendations. Should be cached.\nconst allProgramScores = okayRecs.programScores(allUserRatings);\n\n// What programs are the users most likely to like?\nconst subUserRecommendations = okayRecs.userRecommendations(allProgramScores, subUserRatings);\n\n// What other users is this user similar to?\nconst subUserSimilarUsers = okayRecs.similarUsers(allUserRatings, subUserRatings);\n```\n\n### Output\n\n```js\n// subUserRecommendations\n{\n    \"user10\": [\n        {\n            \"idprogram\": \"https://www.metacritic.com/tv/what-we-do-in-the-shadows-2019\",\n            \"rating\": 4,\n            \"confidence\": 16\n        },\n        {\n            \"idprogram\": \"https://www.metacritic.com/tv/gentleman-jack\",\n            \"rating\": 4,\n            \"confidence\": 13\n        },\n        {\n            \"idprogram\": \"https://www.metacritic.com/tv/the-first\",\n            \"rating\": 4,\n            \"confidence\": 11\n        },\n        {\n            \"idprogram\": \"https://www.metacritic.com/tv/shangri-la-2019\",\n            \"rating\": 4,\n            \"confidence\": 11\n        },\n        {\n            \"idprogram\": \"https://www.metacritic.com/tv/immigration-nation\",\n            \"rating\": 4,\n            \"confidence\": 7\n        },\n        ...\n}\n\n// subUserSimilarUsers\n{\n    \"user10\": [\n        {\n            \"screenname\": \"user23\",\n            \"rating\": 31,\n            \"confidence\": 28\n        },\n        {\n            \"screenname\": \"user85\",\n            \"rating\": 31,\n            \"confidence\": 24\n        },\n        {\n            \"screenname\": \"user65\",\n            \"rating\": 30,\n            \"confidence\": 22\n        },\n        {\n            \"screenname\": \"user123\",\n            \"rating\": 29,\n            \"confidence\": 22\n        },\n        {\n            \"screenname\": \"user139\",\n            \"rating\": 29,\n            \"confidence\": 21\n        },\n        {\n            \"screenname\": \"user14\",\n            \"rating\": 29,\n            \"confidence\": 20\n        },\n        ...\n    ]\n}\n```\n","readmeFilename":"README.md"}