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

Call statistics #76

Closed Korne127 closed 1 year ago

Korne127 commented 1 year ago

Hey; this is an amazing tool and it's really great to look at all the stats. While using it, I've thought that it could be a great addition if it also supported call statistics. At least the discord exports saves the beginning and ending time of each call (in DMs & group chats). That could be parsed as well and stats about it could be displayed in a new tab.

I'd imagine it to be similar to the Message statistics, just using the call information instead of the message information:

All these statistics and graphs could also be filtered by the Call starter (or Call author), meaning the person who started the call. This could also be done just as in the message tab where you can filter all the data by the message author(s).

What do you think about this?

mlomb commented 1 year ago

Hey! You put a lot of tought into this! You are right, call stats would be a great addition to chat-analytics!

Since I rarely use direct or group calls, I don't have a good export with lots of calls It should be possible to implement this without any major changes 😄. If you want to give it a try, I'm open to a PR

hopperelec commented 1 year ago

I have quite a few DMs and group chats with lots of calls, so I'd be happy to obfuscate them and provide them to be used for testing. I could blank out all the user information (but maintain some sort of unique ID) and message content. iirc, calls are treated as messages, so if just have to be careful not to competent clear the message content of those. Would this cause any issues?

Korne127 commented 1 year ago

Thanks for the quick response :) I'm glad that you agree that it would be a nice addition :D About a pull request: I'd like to try to look into it and add it by myself. My lectures are starting in three days though (and I need to do some planning before that), and since I haven't really looked into the source code yet (I just found this project a few days ago), I just can't exactly promise how quick I'll be able to find my way around and implement that all. I have quite some chats with calls to potentially test that with, but I think that more exports can still help to test. I guess you could replace user ids and contents as you said and just provide extracts out of the reports.

mlomb commented 1 year ago

Nice! There is no rush, I'm in the middle of the semester right now too.

Yes I agree adding samples here might be a good idea, maybe even create a script that does that automatically

hopperelec commented 1 year ago

Back on my computer now. With the script did, you mean to generate samples or to obfuscate reports?

hopperelec commented 1 year ago

Hopefully I've obfuscated it enough 😅 For some reason you can't attach JSON files to GitHub issues, but you are able to attach ZIP files and it is quite large (well, 4MB) anyways so I've just zipped it. Sample group chat.zip

Laiteux commented 1 year ago

That would be insane.

SeymourGx commented 1 year ago

Apologies for the bump, but I thought I'd voice some support for this suggestion as well! This is the exact feature I downloaded the app hoping for -- I fell in love with all the other features, to be sure, but this was my primary use case. Call history isn't natively supported by Discord, so for someone you may have tens or hundreds of thousands of messages with, finding logs of or statistics pertaining to your many calls is quite difficult. A section or sub-section for call history/statistics would be thoroughly appreciated. Thank you for maintaining this wonderful tool!

mlomb commented 1 year ago

👀 I started working on this!

I'll kindly ask you to try your exports once the UI is ready, for errors and feedback 😄 Soon™

mlomb commented 1 year ago

I think the new calls section is ready to be tested, anyone want to give it a shot? Use https://pr-88.chat-analytics.pages.dev, currently Discord and Telegram have calls support

SeymourGx commented 1 year ago

It appears to work as intended! I've tested this on the beta site linked, using a few months' worth of Discord DMs between myself and another user (50k+ messages). The other sections still function as normal, and the results for the call section were pretty interesting to me. Here's a copy of what it looks like for anyone else curious as to the new feature: image No bugs to report or feedback at this time. Thanks so much, @mlomb !

mlomb commented 1 year ago

Merged! Not all stats that @Korne127 suggested have been implemented, I'll leave some for a future update

https://github.com/mlomb/chat-analytics/blob/7722e120395028f706262115ca62c11ed73e491e/docs/CHANGELOG.md?plain=1#L3-L10

Thanks for all the people that helped!