This python script analyses interactions between users from a given Whatsapp chatlog and stores results in an infographic.
First, install the necessary packages with pip (preferrably in a venv):
$ pip install -r requirements.txt
If you are on MacOS, you will need to install a different backend for matplotlib to render emojis. This blog post describes how to install mplcairo on your system.
How to export a Whatsapp chat history:
- Go to a users profile
- Scroll down and select 'Export Chat'
- Select 'Without media'
This results in a zip file, which you can then extract, and paste the chats.txt into the chat_logs
folder in the current directory. In the main.py
file, simply change the string in load_file("chat.txt")
to the name of your text file.
After running main.py
, the results should be stored in output/poster_$user1_$user2.pdf
Example generated poster (Obviously redacted):