manu-chroma / whatsappR

Visualising whatsapp chats using the "Email chat" option available.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generating a wordcloud based on the data generated from your Whatsapp chats.

Prerequisites-

  • R (preferably version 3.2.3 or higher)
  • A WhatsApp chat in plain text format

Here's how to get the text data-

  • Open up your Whatsapp.
  • Open up the chat you wish to parse.
  • Tap on the menu button present near the top right of your screen.
  • Click on email chat.
  • Download the file mailed to your email.
  • Replace the path given here with your desired path.
whatsappRaw <- read.table("WhatsApp Chat with CSE Junior Year.txt", header=FALSE,fill = TRUE)
library(dplyr)
whatsappDF <- tbl_df(whatsappRaw)
head(whatsappDF) 

Selecting only the names of the recipients (the data frame is loaded in the form of columns from V1:V20):

select(whatsappDF,V5)

The cloud was generated in the following way:

library(wordcloud)
wordcloud(whatsappDF$V5, random.order = FALSE, max.words = 100, col = brewer.pal(7,"Accent"))

Wordcloud

About

Visualising whatsapp chats using the "Email chat" option available.


Languages

Language:HTML 99.9%Language:R 0.1%