Group Abstract Group Abstract

Message Boards Message Boards

Analyze your WhatsApp Chat

Posted 5 years ago

This post is to share a simple code that allows you to visualize some statistics and trends of your individual or group chats in WhatsApp! The main results are:

  • Time Series of the messages in the group or conversation
  • Pie Chart showing the number of messages sent by each person
  • Bar Chart showing the time in which every person send more messages
  • And more.. !

Download your WhatsApp conversation is really easy, just follow the 3 simple steps shown in this link: https://faq.whatsapp.com/android/chats/how-to-save-your-chat-history/?lang=en. Just make sure your phone is in 24h-format exporting your chat!

An example (with changed names) is: enter image description here

Let me know any doubts or suggestions to improve this notebook!

8 Replies
Posted 4 years ago

Could you post an example of the chatFile.txt that you used?

I tried to run your notebook on a file I exported from WhatsApp and it didn't work.

The first error was that Length@messages == Length@datesAndTime was false.

After that lots and lots of errors.

I'm wondering if the file format is different because the file I got was called _chat.txt not chatFile.txt.

Also I chose the no media version of the file which is what I assume you used since the file you used is .txt.

I use WhatsApp on an iPhone and here's the format, names changed and the blank line between lines isn't in the file but if I don't put it in the lines show up as concatenated in this message:

[2/6/16, 23:57:17] ‎name1 created group “random fake chat name”

[2/6/16, 23:57:17] ‎name1 added you

[2/6/16, 23:57:46] name1: How's almost super bowl??

[2/7/16, 08:39:18] name2: So there were a total of

POSTED BY: trinko
Posted 5 years ago

Thanks Ivan, even though I find it is not that simple to do but you had given a good and 'simple' explanation on the how.

POSTED BY: Yasmin Hussain

enter image description here -- you have earned Featured Contributor Badge enter image description here

Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Posted 5 years ago

Thanks Ivan.

Though, our definitions of "simple" might be a bit different; examples like this not only help me to better understand what Wolfram can do, they help me to imagine what I might be able to do with Wolfram.

POSTED BY: Mike Besso
Posted 4 years ago

I posted an example of the file and it uses 24 hour time

[2/6/16, 23:57:17] ‎name1 created group “random fake chat name”

[2/6/16, 23:57:17] ‎name1 added you

[2/6/16, 23:57:46] name1: How's almost super bowl??

[2/7/16, 08:39:18] name2: So there were a total of

So that can't be the problem. Other thoughts? Does this data look like the data you used?

And thanks for replying so quickly!

POSTED BY: trinko

I replaced "/" with ".", but it did not change anything. messages looks like the same as rawData but with curly braces around it {}. messages == {rawData} evaluates to true.

Update: Fixed this problem now. (Still some other things to change for European date format) Had to also add `~~","~~ between date and time in my format.

POSTED BY: Laurenz Hemmen

That is not the problem for me. My file contains 24h format. Messages has one element, datesAndTime is empty. I think it is because my dates have European format. I am really new to Mathematica and got this link send after registering for the free trial and it looked cool. Can you explain how I should change the Code for dates in the form of

[17.03.20, 08:59:46] <name>: <message>

? Thanks :)

POSTED BY: Laurenz Hemmen
Posted 4 years ago
POSTED BY: Ivo Malinowski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard