Analyzing Public Image: A Twitter Data Analysis Project
VerifiedAdded on 2023/06/11
|9
|1446
|251
Project
AI Summary
This project focuses on analyzing Twitter data to understand public perception of a well-known public figure. It involves using the twitteR library to search for tweets, the tm library to construct a document-term matrix, and generating word clouds to visualize term frequencies. The project also covers techniques for refining word clouds by updating stop lists, sharing findings on Twitter, calculating term frequencies, and visualizing tweets. Additionally, it explores methods for analyzing follower counts, understanding audience growth, segmenting followers by location, and comparing old and new followers. The project further investigates network analysis of users, examining retweet patterns and the temporal dynamics of tweet engagement. The document is available on Desklib, a platform providing study tools and resources for students.

8.1 Analysis of Twitter language about the person
1. Search twitter function
By using this function, we will search the twitter for a given search string. Arguments used in
this function as follows:
‘search string’ this search query is given to twitter. If we have more than one query terms then
we use ‘+’ for that purpose.
‘ n’ it will return maximum number of tweets
‘Lang’ the value of lang is not null,then it will restricts tweets according to the given language.
‘since’ if this field contains not null,then restrict tweets based on given date. The allowed
format of the date will be YYYY-MM-DD
‘Until’ if this field contain not null value then it will display the tweets until the specified date
will met.
‘locale’ if this field contain not null value then it will set the locale for the given search query.
From the rules in twitter APl, 03/06/11 only ja is effective.
‘geo code’ it will return tweets according to given radius ,longitude, and latitude
‘sinceID’ it will return all the tweets from users having id above the specified id.
‘maxID’ it will return all the tweets from users having id below the specified id.
‘resultType’ it contains three values.
Mixed-returns current or recent information as well as popular information.
Recent- returns real time information
Popular- returns most popular information
Rtweets function is a wrapper around searchtwitter
Example for searchtwitter function given below:
1. Search twitter function
By using this function, we will search the twitter for a given search string. Arguments used in
this function as follows:
‘search string’ this search query is given to twitter. If we have more than one query terms then
we use ‘+’ for that purpose.
‘ n’ it will return maximum number of tweets
‘Lang’ the value of lang is not null,then it will restricts tweets according to the given language.
‘since’ if this field contains not null,then restrict tweets based on given date. The allowed
format of the date will be YYYY-MM-DD
‘Until’ if this field contain not null value then it will display the tweets until the specified date
will met.
‘locale’ if this field contain not null value then it will set the locale for the given search query.
From the rules in twitter APl, 03/06/11 only ja is effective.
‘geo code’ it will return tweets according to given radius ,longitude, and latitude
‘sinceID’ it will return all the tweets from users having id above the specified id.
‘maxID’ it will return all the tweets from users having id below the specified id.
‘resultType’ it contains three values.
Mixed-returns current or recent information as well as popular information.
Recent- returns real time information
Popular- returns most popular information
Rtweets function is a wrapper around searchtwitter
Example for searchtwitter function given below:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

1.1 tm library
Creating term-document matrix was a general approach in text mining. The Tm package contains
two classes one is TermDocumentMatrix and another one is DocumentTermMatrix (Barba et al.,
2013). Both these classes used for creation of sparse matrices. If we want to create a dense
matrix, use as.matrix ().
Operations on Term-Document Matrices
1. findFreqTerms
This function used to find frequent terms, for example we have to find a item that will occur in 5
times, then we can use this function for that purpose.
2. findAssocs
If we want to find associations that is terms that are correlated then we can use this function.
3.inspect
4. This method was used to remove sparse terms.
We can construct a word cloud of the words using this document term matrix(Moe and Schweidel,
2017). Word cloud can be used to show the frequency of words in a document.
Creating term-document matrix was a general approach in text mining. The Tm package contains
two classes one is TermDocumentMatrix and another one is DocumentTermMatrix (Barba et al.,
2013). Both these classes used for creation of sparse matrices. If we want to create a dense
matrix, use as.matrix ().
Operations on Term-Document Matrices
1. findFreqTerms
This function used to find frequent terms, for example we have to find a item that will occur in 5
times, then we can use this function for that purpose.
2. findAssocs
If we want to find associations that is terms that are correlated then we can use this function.
3.inspect
4. This method was used to remove sparse terms.
We can construct a word cloud of the words using this document term matrix(Moe and Schweidel,
2017). Word cloud can be used to show the frequency of words in a document.

If the constructed word cloud are not informative, then update the stop list. Now draw the word
cloud again.
Now share the final workcloud on twitter with correct hashtags.
We can obtain a vector of frequencies by sum all the columns in the document term matrix.
From the vector of term frequencies , we can compute proportion of each term in the tweets.
8.2 Visualization of the tweets about the person
There are several visualization tools are available to visualize the tweets that are posted by the
person. And also we want to visualize the tweets about the person from two dimensional
space(Yang and Perrin, 2014).
Tweets map, audience, key hole are some of the examples for visualization tools.
We have to choose correct method for visualization.
Animated visualization also done in twitter.
8.3 Analysis the follower count of the users
To measuring the performance of a growing audience on twitter based on follower count. In later
this is move to marketers focus.so all new follower get details about your audience change.
Different type of audience are there. We have to measuring change in follower count.
Followers’ followers count calculation:
cloud again.
Now share the final workcloud on twitter with correct hashtags.
We can obtain a vector of frequencies by sum all the columns in the document term matrix.
From the vector of term frequencies , we can compute proportion of each term in the tweets.
8.2 Visualization of the tweets about the person
There are several visualization tools are available to visualize the tweets that are posted by the
person. And also we want to visualize the tweets about the person from two dimensional
space(Yang and Perrin, 2014).
Tweets map, audience, key hole are some of the examples for visualization tools.
We have to choose correct method for visualization.
Animated visualization also done in twitter.
8.3 Analysis the follower count of the users
To measuring the performance of a growing audience on twitter based on follower count. In later
this is move to marketers focus.so all new follower get details about your audience change.
Different type of audience are there. We have to measuring change in follower count.
Followers’ followers count calculation:
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

We have to understand the potential of your followers. Next to find the followers of your
followers.
Calculate overall competitors’ followers:
We have to compare your own growth rate and competitor audience growth rate.
Know how active your followers are:
followers.
Calculate overall competitors’ followers:
We have to compare your own growth rate and competitor audience growth rate.
Know how active your followers are:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

To find who are not yet followers from engaged users.
And then we have to find who are using your name and brand. Next to find who are not already
following you. These two activity used to find how many users are unaware of your activities.
So we have to create a connection between these users. This connection is help to connect the
followers directly. Automatically increase your followers count.
Next to find who are not a followers. Then to find who are using or rewriting your name and
brand.
To monitor their activities. This is create a better opportunities to engage them directly.
Follower’s location segmentation:
And then we have to find who are using your name and brand. Next to find who are not already
following you. These two activity used to find how many users are unaware of your activities.
So we have to create a connection between these users. This connection is help to connect the
followers directly. Automatically increase your followers count.
Next to find who are not a followers. Then to find who are using or rewriting your name and
brand.
To monitor their activities. This is create a better opportunities to engage them directly.
Follower’s location segmentation:

This location based segmentation is used to measure your share of voice on twitter. And this is
used to increase your followers count.
We have to find how they engaged your followers.
First to segment the followers. Next to find who are using your brand and name. Then to create
the profile for followers that frequently retweet your content. This public profile is used to
understand your follower’s activity.
Compare your old followers with new followers:
It very important to know about who are all your followers. This is the first step to
know about comparison between old followers and new followers. And also it will let you know
about crucial changes in follower count.
8.4 Network of the users:
There are some numerical value calculated how retweets happen with respect to time
In first one hour most of the retweets happen that is 92.4% retweets happen in first hour of
the original tweets.
In the next one hour 1.63% retweets happen.
In the third our remaining 0.94 retweets happen.
The above scenario clearly show that if a tweet is not retweeted in first one hour then there is no
way or no other chance to retweet them in following hour.
used to increase your followers count.
We have to find how they engaged your followers.
First to segment the followers. Next to find who are using your brand and name. Then to create
the profile for followers that frequently retweet your content. This public profile is used to
understand your follower’s activity.
Compare your old followers with new followers:
It very important to know about who are all your followers. This is the first step to
know about comparison between old followers and new followers. And also it will let you know
about crucial changes in follower count.
8.4 Network of the users:
There are some numerical value calculated how retweets happen with respect to time
In first one hour most of the retweets happen that is 92.4% retweets happen in first hour of
the original tweets.
In the next one hour 1.63% retweets happen.
In the third our remaining 0.94 retweets happen.
The above scenario clearly show that if a tweet is not retweeted in first one hour then there is no
way or no other chance to retweet them in following hour.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

The diagram below shows that pictorial representation of how the original tweets are retweeted
in second one hour(Haller, 2013). In this diagram time in hours (since original tweet) represented
in x axis. Fraction of hours occurred in particular hour represented in Y axis.
This diagram not show how retweets happen in first one hour.
But we know that most retweets happen in first one hour.
We clearly know that 96.7% replies happen in first one hour from the original tweets that are
published. After that some minimal percentage of retweets happen in next one hour. After the
remaining retweets happen.
Donald trump twitter world map:
When we see Donald trump world map, it is interesting to see most frequently used words
there. But in the end, its not that much interesting. Because his program downloads 3000 tweets
from his most recently used tweets of him. So the program doesn’t download extended tweets.
8.5 Images of the public figure:
Donald trump twitter world map:
in second one hour(Haller, 2013). In this diagram time in hours (since original tweet) represented
in x axis. Fraction of hours occurred in particular hour represented in Y axis.
This diagram not show how retweets happen in first one hour.
But we know that most retweets happen in first one hour.
We clearly know that 96.7% replies happen in first one hour from the original tweets that are
published. After that some minimal percentage of retweets happen in next one hour. After the
remaining retweets happen.
Donald trump twitter world map:
When we see Donald trump world map, it is interesting to see most frequently used words
there. But in the end, its not that much interesting. Because his program downloads 3000 tweets
from his most recently used tweets of him. So the program doesn’t download extended tweets.
8.5 Images of the public figure:
Donald trump twitter world map:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

I used twitter and R to make a world map of Donald trump’s tweets. This is used to be interesting
to see what his most used words are. The program downloads 3000 of his most recent tweets
unfortunately it cannot download all of the extended more tweets. It was not that interesting in
the end.
Reference
Barba, I., Cassidy, R., De Leon, E. and Williams, B. (2013). Web Analytics Reveal User
Behavior: TTU Libraries’ Experience with Google Analytics. Journal of Web Librarianship,
7(4), pp.389-400.
Haller, A. (2013). Web information systems engineering-- WISE 2011 and 2012 Workshops.
Berlin: Springer.
Moe, W. and Schweidel, D. (2017). Opportunities for Innovation in Social Media
Analytics. Journal of Product Innovation Management, 34(5), pp.697-702.
Yang, L. and Perrin, J. (2014). Tutorials on Google Analytics: How to Craft a Web Analytics
Report for a Library Web Site. Journal of Web Librarianship, 8(4), pp.404-417.
to see what his most used words are. The program downloads 3000 of his most recent tweets
unfortunately it cannot download all of the extended more tweets. It was not that interesting in
the end.
Reference
Barba, I., Cassidy, R., De Leon, E. and Williams, B. (2013). Web Analytics Reveal User
Behavior: TTU Libraries’ Experience with Google Analytics. Journal of Web Librarianship,
7(4), pp.389-400.
Haller, A. (2013). Web information systems engineering-- WISE 2011 and 2012 Workshops.
Berlin: Springer.
Moe, W. and Schweidel, D. (2017). Opportunities for Innovation in Social Media
Analytics. Journal of Product Innovation Management, 34(5), pp.697-702.
Yang, L. and Perrin, J. (2014). Tutorials on Google Analytics: How to Craft a Web Analytics
Report for a Library Web Site. Journal of Web Librarianship, 8(4), pp.404-417.

⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 9

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024 | Zucol Services PVT LTD | All rights reserved.