BIG DATA ANALYSIS OF WHATSAPP MESSAGES USING R PROGRAMMING
INTRODUCTION
What is Data Analysis?
> TotalsentimentTotalsentiment<-cbind("sentiment"=rownames(Totalsentiment),Totalsentiment)
Nowadays data is in huge amount and to analyze data it is very difficult task. An enormous repository of terabytes of data is generated day by day from the information systems and from various digital technologies such as Internet of Things and cloud computing. The analysis of these huge enormous data requires a lot of efforts at various levels to extract specific knowledge for decision making process. Therefore, big data analysis is a current area of research and development which can be done using R.
The analysis is done here in the R environment for statistical computing ,graphics and
visualization of data analysis , which is an open-source computing of the S statistical computing
language.
INTRODUCTION
Whats App is an application which is used for transferring text, media,files,images as well as audio calling and video calling. This article shown how the individuals level of addiction to the Whats App group as per their age group and gender(male or female) with the help of R Programming.In this article data analysis using R can be used to analyze the various amount of data either related to similarities and to the positive comments and negative comment etc.
It is the process of cleaning, transforming and modelling data with the purpose of extracting the useful information, conclusions, and thus useful for the decision-making process is Data Analysis.
To find what the people prefer mostly in WhatsApp group chatting.
- Total number of messages send in a day.
- To find whic one is your active day of the week.
- To find which age group participants are more active on WhatsApp group and number of messages send by each age group participants per month, day, hour.
- To find number number of Males and females that mostly used the WhatsApp .
Record in Whats App
WhatsApp Group chat data that is used for data analysis is of a year which consists of above than 11,359 records and comprises of certain characteristics that define how much the person is anger ,anticipation, disgust, fear, joy, sadness, surprise ,trust, negative, positive at a time,how much a particular person is using WhatsApp Chat Group, such as the count the number number of sentiments, type of messages posted by each individual in the group (Smiley, Text, Multimedia). RStudio is the open sourceIDE useful for R and it is used to perform analysis of data for the data collected through Whats App.
Data collection is the process to collect data widely from worldwide from the various resources like we can take a data from Whats App ,geographical data etc.
Setting up the Machine
Once R has been installed you can choose to work with an integrated development environment (IDE) RStudio. It is the most popular IDE for R and supports debugging, workspace management, plotting .
Source Pane
On the left side on top is the source pane where you can write and edit your R programs and documents.
Console Pane
It is located on the left side at the bottom, where results are displayed.
Workspace Pane
It is located on the right side on top and allows quick access to additional tools. It is used to perform the following functions.
In R you have to install various packages containing libraries ie wordcloud,tm for data analysis of Whats App messages i.e wordcloud,tm,
Setting up the Machine
Once R has been installed you can choose to work with an integrated development environment (IDE) RStudio. It is the most popular IDE for R and supports debugging, workspace management, plotting .
Source Pane
On the left side on top is the source pane where you can write and edit your R programs and documents.
Console Pane
It is located on the left side at the bottom, where results are displayed.
Workspace Pane
It is located on the right side on top and allows quick access to additional tools. It is used to perform the following functions.
- Environment that exhibits data objects defined in the current R session.
In R you have to install various packages containing libraries ie wordcloud,tm for data analysis of Whats App messages i.e wordcloud,tm,
>install.packages("wordcloud")
>install.packages("tm")
- It is used to sentiment analysis
>install.packages("tm")
- tm is used for text mining
>install.packages("syuzhet")
>library()
>library("wordcloud")
>library("syuzhet")
>texts
> texts<-readLines("chat.txt") (#It is used to read chat.txt mesages)
>sentiment<-get_nrc_sentiment(texts)
> sentiment
>names(Totalsentiment)<-c("count")
> Totalsentiment
anger
anticipation disgust fear joy sadness surprise trust negative positive
1 0 1 0
0 1 0
0 1
0 2
2 0 1 0
1 0 0
1 1 1
1
3 0 1 0
0 1 0
1 3 0
3
4 0 0 0
0 0 0
0 1 0 1
5 0 1 0
0 0 0
0 2 0
2
6 0 2 0
0 0 0
0 1 0
2
7 0 0 0
0 0 0
0 1 0
1
8 0
0 0 0 0 0
0 0 0
0
9 0 0 0
0 0 0
0 0 0
0
10 0 0 0
0 0 0
0 0 0
0
11 0 0
0 0 0
0 0 0
0 0
12 0 0 0
0 0 0
0 0 0
0
13 0 2 0
0 1 0
1 0 0
2
14 0 0 0
0 0 0
0 1 0
1
15 0 0 0
0 0 0
0 0 0
0
16 0 0 0
0 0 0
0 0 0
0
17 0 0 0
0 0 0
0 0 0
0
18 0 0 0
0 0 0
0 0 0
0
19 0 0 0
0 0 0
0 0 0
0
20 0 0 0
0 0 0
0 0 0
0
21 0 0 0
0 0 0
0 0 0
0
22 0 0 0
0 0 0
0 0 0
0
23 0 0 0
0 0 0
0 0 0
0
24 0 0 0
0 0 0
0 0 0
0
25 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0 0 0
1
72 0 0 0
0 0 0
0 1 0
1
73 0 0 0
0 0 0
0 0 0
0
74 0 0 0
0 0 0
0 1 0
1
75 0 0 0
0 0 0
0 1 0
1
76 0 0 0
0 0 0
0 1 0
1
77 0 0 0
0 0 0
0 1 0
1
78 0 0 0
0 0 0
0 1 0
1
79 0 1 0
0 1 0
0 1 0
2
80 0 0 0
0 0 0
0 1
0 1
81 0 0 0
0 0 0
0 1 0
1
82 0 0 0
0 0 0
0 1 0
1
83 0 0 0
0 0 0
0 0 0
0
84 0 0 0
0 0 0
0 1 0
1
85 0 0 0
0 0 0
0 2 0
2
86 0 0 0
0 0 0
0 0 0
0
87 0
1 0 0 1 0
0 2 0
3
88 0 0 0
0 0 0
0 0 0
0
89 0 1 0
0 1 0
0 2 0
2
90 0 2
0 0 2
0 1 2
0 3
91 0 2 0
0 2 0
1 2 0
3
92 0 2 0
0 2 0
1 2 0
3
93 0 1 0 0
1 0 0
2 0 2
94 0 2 0
0 2 0
1 2 0
3
95 0 2 0
0 2 0
1 2 0
3
96 0 2 0
0 2 0
1 2 0
3
97 0 2 0
0 2 0
1 2 0
3
98 0 2 0
0 2 0
1 2 0
3
99 0 2 0
0 2 0
1 2 0
3
100 0 2 0
0 2 0
1 2 0
3
[ reached
getOption("max.print") -- omitted 99 rows ]
>
Totalsentiment<-data.frame(colSums(sentiment[,c(1:10)]))
> Totalsentiment
colSums.sentiment...c.1.10...
anger 4
anticipation 117
disgust 4
fear 13
joy 94
sadness
8
surprise 47
trust 146
negative 19
positive 198
> names(Totalsentiment)<-c("count")
> Totalsentiment
count
anger
4
anticipation
117
disgust
4
fear
13
joy
94
sadness
8
surprise
47
trust
146
negative
19
positive
198
>
Totalsentiment<-cbind("sentiment"=rownames(Totalsentiment),Totalsentiment)
> Totalsentiment
sentiment count
anger
anger 4
anticipation anticipation 117
disgust
disgust 4
fear
fear 13
joy
joy 94
sadness
sadness 8
surprise
surprise 47
trust
trust 146
negative
negative 19
positive
positive 198
> rownames(Totalsentiment)<-NULL
> Totalsentiment
sentiment count
1
anger 4
2
anticipation 117
3
disgust 4
4
fear 13
5
joy 94
6
sadness 8
7
surprise 47
8
trust 146
9
negative 19
10
positive 198
> barplot(Totalsentiment$coUnt,names.arg =
Totalsentiment$sentiment)
CONCLUSION
From the analysis it is found that total number of active users in WhatsApp
group chat are 22 consisting of various characteristics such anger,fear,joy etc.
CONCLUSION
From the analysis it is found that total number of active users in WhatsApp
group chat are 22 consisting of various characteristics such anger,fear,joy etc.
Comments
Post a Comment