mlomb / chat-analytics

Generate interactive, beautiful and insightful chat analysis reports
https://chatanalytics.app
GNU Affero General Public License v3.0
711 stars 51 forks source link

Most positive/negative users based on sentiment #26

Closed hopperelec closed 1 year ago

mlomb commented 1 year ago

Totally doable! I think it should be done in the SentimentStats block and similar to how authorsReplyCount works in the InteractionStats block.

Probably we want a dropdown in the title, something along the lines "Most [positive, negative] authors", also probably changing the color of the bars accordingly :)

hopperelec commented 1 year ago

Instead of a positive/negative dropdown, I think there should be a dedicated icon for changing the direction of the sort. This icon could be used elsewhere like:

hopperelec commented 1 year ago

I'm actually not sure how to calculate this without producing biases. If you just sum all the sentiments for every message an author has sent, it would pretty much just be the same as 'Messages sent by author' saying the most active authors are more positive than less active authors. If you take the average sentiment across every message an author has sent, it would be very biased towards authors who have sent fewer messages so less data is available for them. I think we'd have to calculate the average but only for authors who have sent a minimum number of messages (either a fixed threshold such as 1000 messages, or a percentage of other authors such as top 20% of authors)

hopperelec commented 1 year ago

Just thought- this could be done for channels too, rather than just users. This should be an(other) dropdown

mlomb commented 1 year ago

I'll close this issue due https://github.com/mlomb/chat-analytics/issues/56#issuecomment-1452488531. I'll also open a new issue with the icon #63