Open ShortTimeNoSee opened 1 month ago
Hey there!
create some visual data of your chat analytics
Do you mean exporting the graphs?
I think when they said "chat analytics", they were referring to analytics of their chats, not this app
For the export instructions, we can reference this. For the structure of the JSON file, I've found a C# project which parses the JSON; we obviously can't use the C# itself but, assuming the format hasn't changed much within the past 5 years, it should give us an idea of what may be contained in the file.
Sorry, I don't know why I read "Telegram" instead of "Instagram" lol
Yeah
Hey there!
create some visual data of your chat analytics
Do you mean exporting the graphs?
I mean like what chatanalytics does for other messaging services in general, like Discord.
When you export your data from Instagram you can choose to export your DMs/GCs (messages) in JSON or HTML format. There doesn't exist anything right now that can analyze your chat data the same way your web app can analyze data (and I haven't found anything that analyzes Instagram data exports at all) and put it in a visual format.
The data exports for messages come out as folders for each person, each folder contain message.json file(s). Example:
So I think, given the know-how, it's possible for someone to create a tool that can analyze the JSON exports from message data requests.
While typing this I see hopperelec's addition to the Issue; here's some snippets of the format of the JSON file for messages (collapsed because it's a bunch):
Thanks for the samples, those will be very useful!
This is totally possible, in fact the structure looks very similar to Messenger exports (both from Meta)
Can you try to load them like they were Messenger exports?
Edit: I want to add that the project is designed in a way that adding new platforms is relatively easy, we could support lots of more platforms eventually. The problem is that companies may not be consistent with their export formats :(
This is totally possible, in fact the structure looks very similar to Messenger exports (both from Meta)
Can you try to load them like they were Messenger exports?
That seems to work pretty well!
This part didn't register videos sent or edits (and there isn't anything built in for Reels sent etc.), but those are small aspects. Here's an edited message's JSON though, where I added emojis to the end of the message content:
{
"sender_name": "my display name",
"timestamp_ms": 1720829614035,
"content": "Last year \u00f0\u009f\u0098\u00ad (edited)",
"is_geoblocked_for_viewer": false
},
{
"sender_name": "my display name",
"timestamp_ms": 1720829590324,
"content": "Last year",
"is_geoblocked_for_viewer": false
},
Your web app likely sees this as two messages instead of one message that was edited.
It also doesn't read emojis correctly, only those that don't get turned into Unicode escape sequences or whenever it thinks it sees Discord's emoji format as you can see here:
For some reason I was under the impression that there was something that also compared message lengths but I'm not seeing that so I think I'm imagining things (could make an issue for that though, might be a good additional feature).
For some reason I was under the impression that there was something that also compared message lengths but I'm not seeing that
Under Language > Language Statistics
there is "Average words per message". There is also an issue for this https://github.com/mlomb/chat-analytics/issues/67
Demonstration of it seeing the edited message as separate messages
And I just noticed this as well:
For some reason I was under the impression that there was something that also compared message lengths but I'm not seeing that
Under
Language > Language Statistics
there is "Average words per message". There is also an issue for this #67
Oh I don't even think I've even noticed that. Whatever I was thinking of compared the message lengths between the users.
The edited messages would be really hard to do since (from the JSON you sent) we have no way to connect both messages (no IDs). Right now each message has a time of when it was edited and the latest content. We either skip all "(edited)" messages causing broken edit stats or create ghost empty messages skewing message counts (maybe we could do some dirty trick to skip but idk) Now that I think of, we need to know the time sent and edited to compute the stats.
The emojis thing you are right, we should handle unicode escaped emojis (and symbols for that matter). Maybe in a new issue?
we have no way to connect both messages (no IDs)
Yeah that's what I was thinking. Messages can be edited within 15 minutes, but people send multiple messages in that span of time and there's no guaranteeing which message was edited. I think the one thing that can be done relating to this though is excluding messages that end with " (edited)" from any message statistics. Oh got ahead of myself there you already mentioned that
And I just created an issue for the emoji handling 🙏
Nice! I'll let this open for now. We should make clear that Instagram exports are compatible with Messenger exports. Maybe have two buttons in the UI that use the same parser and have different instructions.
And maybe rename "MessengerParser" to "MetaParser" (?)
MetaParser wouldn't really make sense because WhatsApp is also made by Meta but that has its own parser. Also, I would personally read "MetaParser" as meaning a parser for chat-analytics messages, whatever that means lol
WhatsApp is also made by Meta
jeez these Meta guys, true
I don't use IG/FB, but now that I recall you can message people between both platforms (interoperable). Maybe that's why it is so similar.
Considering you can export your Instagram data in JSON, I think it'd be great if there was a tool out there that could create some visual data of your chat analytics, and this service would be a great home for such a tool.