WhatsApp Chat Analyzer

WhatsApp Chat Analyzer is a web application built with Streamlit that allows users to upload their WhatsApp chat history and visualize key statistics and trends. It provides insights into total messages, media shared, most common words, and emoji usage. Users can generate timelines, activity maps, word clouds, and analyze chat data on a per-user or overall basis. The project features three main components: app.py for the Streamlit interface, helper.py for data processing and visualization, and preprocessor.py for cleaning and structuring chat data.

Services:
  • Visualization
  • Preprocessing
Client:

Personal

Project link:
www.flatheme.net
Duration:

N/A

A Streamlit-based web application for analyzing WhatsApp chat data. This tool allows users to upload their WhatsApp chat history and visualize key statistics, timelines, activity maps, most common words, and emoji usage. It is designed to offer insights into both individual and group chats, making the analysis of conversations interactive and insightful.


Features

  • Upload WhatsApp Chat File: Easily upload the exported .txt file of your WhatsApp conversation.
  • User-specific or Overall Analysis: Choose to analyze data for a specific user or the entire chat.
  • Top Statistics:
    • Total Messages
    • Total Words
    • Media Shared
    • Links Shared
  • Message Timelines:
    • Monthly and daily message frequency visualized through line charts.
  • Activity Maps:
    • See which days of the week and which months were the most active using bar charts and heatmaps.
  • Busiest Users: Identify the most active participants in a group chat.
  • Word Cloud: Visualize the most common words in the conversation.
  • Most Common Words: Display the most frequently used words with bar charts.
  • Emoji Analysis: Explore the emojis used, with a pie chart showing their distribution.

Code Structure

The project contains three main files:

app.py:

  • The main Streamlit application that handles user interaction and visualization of the chat data.

helper.py:

  • Contains helper functions for data processing and visualization such as:
    • Fetching statistics for messages, words, media, and links.
    • Generating word clouds and identifying the most common words.
    • Analyzing emoji usage and creating activity maps and timelines.
  • Example functions: fetch_stats(), most_busy_users(), create_wordcloud(), emoji_helper(), and more​: contentReference[oaicite:0]{index=0}.

preprocessor.py:

  • Handles the preprocessing of the uploaded chat data:
    • Cleans and structures raw text data into a DataFrame.
    • Extracts user names, message content, dates, and other relevant information.
    • Example function: preprocess()​: contentReference[oaicite:1]{index=1}.

Dependencies

  • Streamlit: For building the web interface.
  • Matplotlib: For generating plots and visualizations.
  • Seaborn: For creating heatmaps.
  • Pandas: For data manipulation and preprocessing.
  • WordCloud: For generating word clouds.
  • URLEXtract: For extracting URLs from messages.
  • Emoji: For emoji analysis.

© 2024 A S M Morshedul Hoque, All Rights Reserved.