cricksmaidiene / whatsapp_chat_analysis

:alembic: An exploratory WhatsApp chat analysis notebook.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exploratory WhatsApp Chat Analysis

About πŸ’πŸ»β€β™€οΈ

  • Privacy-centric Analysis: Securely review summaries of WhatsApp conversations, whether with individuals or group chats.
  • Local Processing: Data never leaves the executing system. Analysis is carried out entirely locally, ensuring utmost privacy.
  • Transparent Code Execution: Jupyter notebooks are utilized to provide full transparency. Users can inspect every line of code that processes chat data. After insights are generated, all chat data is immediately purged from memory.
  • In-depth Metrics: Delve into chat data. Load conversations and uncover insights such as response times, text density, emoji usage, and more.

Gallery πŸ“Έ

Setting Up πŸ› οΈ

  • Recreate conda environment using the following
git clone https://github.com/cricksmaidiene/whatsapp_chat_analysis.git
cd whatsapp_chat_analysis
conda create --name whatsapp_chat_analysis --file env.txt
conda activate whatsapp_chat_analysis

Then run either:

jupyter lab

or

jupyter notebook

Either of the following are the jupyter requirements & versions:

  • jupyterlab==2.2.6 requires jupyter labextension install jupyterlab-plotly@4.14.3, in turn requires nodejs >= 10.0. Install nodejs with conda install nodejs -c conda-forge --repodata-fn=repodata.json
  • jupyter notebook==6.2.0

Executing the Notebook πŸ“

  • To export a WhatsApp chat as a txt file in either iOS or Android, go to a particular chat with a person or group and check the options. There is an option to export chat. Select Without Media and save the resulting text file in the same directory as the notebook.
  • Modify the second cell of the notebook with the chat txt filename / filepath. This highlights to the notebook on which chat file is to be analyzed.
  • Run all cells

Flow of Execution πŸ“Š

  • Text file is loaded, cleaned up and parsed. The messages are turned into a table (or dataframe) at a per-message level.
  • Once the dataframe is created, it is aggregated and re-aggregated for different analyses and visualized using plotly express.

About

:alembic: An exploratory WhatsApp chat analysis notebook.

License:MIT License


Languages

Language:Jupyter Notebook 100.0%