Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a reviewer's average, SD, and histogram of ratings #1

Open
deniseyu opened this issue Feb 25, 2020 · 0 comments
Open

Display a reviewer's average, SD, and histogram of ratings #1

deniseyu opened this issue Feb 25, 2020 · 0 comments

Comments

@deniseyu
Copy link
Owner

It'd be cool to see how harsh or nice each reviewer was. This information is available in the database, and can be presented in the UI, either as part of the index page, or a separate page.

The query would be something like

To get all the reviews, it'd be something like (if going from the index router, where memoizedKeys exists): var reviewKeys = memoizedKeys.filter(k => /*\:*/.match(k))

Then something like this, to grab all the values and filter them down to the set of reviews written by the current user:

redis.get(reviewKeys, (reviews, err) => { reviews.map(r => JSON.parse(r)).filter(r => f.reviewer == req.user.username) })

This should return an array of JSON objects, each representing a review, which can be processed and sorted. Existing logic for computing average and standard deviation is in the indexRouter.js and can be pulled out and reused.

Alternatively, can just not filter down to the current user, and display everyone's stats on one page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant