A tool to analyze and visualize WhatsApp chat data, providing insights into your conversations.
- Python 3.11
- Either Rye or pip for package management
- Install Rye:
# On macOS
brew install rye- Clone and set up the project:
# Initialize rye in the project directory
rye syncpip install -r requirements.txt- Export your WhatsApp chat (without media) from the WhatsApp app
- Place the exported
_chat.txtfile in thedata/raw/directory
Run the analyzer to convert your raw chat file into a structured format:
# If using Rye
rye run analyzer
# If using pip
python -m analyzerThis will create a processed file in data/processed/ with a timestamp.
- Open
/notebooks/cleaning/01-cleaning.ipynb - Update the input file path to match your processed data file:
# Change this line to match your processed file name datafile = processed / "whatsapp-YYYYMMDD-HHMMSS.csv"
- Run all cells in the notebook
- The processed data will be saved as a Parquet file in the
data/processed/directory
Update the config.toml file to point to your newly created Parquet file:
[paths]
current = "whatsapp-YYYYMMDD-HHMMSS.parq"# Generate basic visualizations
python src/main.py visualize
# Generate all available visualizations
python src/main.py visualize --all# run the dashboard after having done rye sync
dashboard --streamlitVisualizations will be saved in the visualizations/ directory.
The analysis will generate several visualizations including:
- Message frequency over time
- Active hours analysis
- User participation statistics
- And more...
├── data/
│ ├── raw/ # Place your _chat.txt here
│ └── processed/ # CSV files from analyzer
├── notebooks/
│ └── cleaning/ # Data cleaning notebooks
├── src/ # Source code
├── images/ # Output images
└── config.toml # Configuration file
If you encounter NumPy-related warnings, try updating your dependencies:
# If using Rye
rye sync
# If using pip
pip install e .Joppe Montezinos 1872651