WhatsApp Chat Analysis Heroku Deployment

About Project:

  • The main goal of this project is to analys the whatsapp chat and represents through charts and visuals.
  • Project is live now and deployed on heroku. visit at https://wp-analyzer.herokuapp.com/
  • This projects can be used for indivisual as well as group chats. ​

Idea:

  1. Created a function that convert WhatsApp chat text file into dataframe with columns name(['date', 'year', 'month', 'day', 'hour', 'minute', 'month_name','day_name', 'user', 'message', 'message_chars']) ​
  2. Which Data you will get in this analysis
  3. Sum
    • Chat starting date, first entry in chat
    • Chat Ending Date, last entry in chat
    • Total Members in chat, only those who had sent atleat one message
    • Total Messsages, including messages, missed calls, media, links
    • Total Words of Messages,
    • Total Links Shared
  4. Bar chart of no messages sent by members
  5. Bar chart of no messages sent by members with mean line
  6. Pie chart with no if messages sent in %
  7. Pie chat of Who started and ended chat most of the time
  8. WordMap of most 75 words used in chat with stopwords and without stopwords
  9. Box Plot of who sent the longest messages
  10. Pie chart of most used emoji
  11. Sunburt chart of members and thier weekly messages(and yearly,monthly,weekly)
  12. Line chart of Daily chat activity(same monthly, yearly) for all and indivisuals
  13. Heatmap represents which has occured more on given to features
  14. Table of 5 longest message in entire chat
  15. Table of 5 Longest message of highest chat happened on a single day
  16. Table of all shared links in chat

Charts used to represents data:

- Bar, Line, Box, WordMap, Sunburst Heatmap

Librabry used

  • streamlit : for web application
  • matplotlib: for charts
  • plotly : intrective charts
  • pandas: for creation of dataframe
  • PIL: opening image file
  • re : regular expression
  • urlextract: for extracting URL from chat
  • collections: for counting each words
  • wordcloud: creating wordmap
  • emoji: extracting emoji from chat
  • warnings: ignore warnings ​

Code written in pycharm in three files

  • app.py : main file
  • preprocessor.py: for generatig dataset
  • helper.py: user defined functions as per required ​

How to use:

  1. To use this webapp first you whatapp chat txt file.

    • You can try your whatsapp of any individuals or groups chat this is 100% SAFE and SECURE, I don't have access to this webapp. So, feel free to use.
    • To export your chat: follow the steps given below:
      • Open your whatsapp in mobile only
      • Open any chat
      • click on three vertical dots (upper right corner)
      • click on More
      • click on Export Chat, proceed with Without Media
      • Now save this file anywhere you want.
  2. Now, vist at https://wp-analyzer.herokuapp.com/

  3. Page will look like below what2

  4. To see details how it works click on plus icon '+', click again '-' to close

  5. Browse your file or drang and drop in the file box.

  6. Once your file has been uploaded all members name will be visible in dropdown menu,default selecte All, if you want to analys for indivisual member then select that member and click on 'Show Analysis'.

Some Snapshots:

what3 what3 what3 what3 what3 what3 what3 what3