This is my social media intelligence assignment, I was referred by my friend Joel sunny.Can i know the price

1 answer below »
This is my social media intelligence assignment, I was referred by my friend Joel sunny.Can i know the price


Assignment2022.pdf
Answered 9 days AfterJun 01, 2022

Answer To: This is my social media intelligence assignment, I was referred by my friend Joel sunny.Can i know...

Mohd answered on Jun 09 2022
87 Votes
Twitter Data Analysis(Elon Musk takeover of twitter)
Twitter Data Analysis(Elon Musk takeover of twitter)
Varsha Gowda
6/4/2022
library(readr)
library(dplyr)
library(rmarkdown)
library(
magrittr)
library(tidytext)
library(textdata)
library(rtweet)
my_dt <- read_csv("New folder (3)/my_dt.csv")
WordCloud
library(wordcloud)
wordcloud(my_dt$text,min.freq =2,scale=c(7,0.5),colors=brewer.pal(8, "Dark2"), random.color= TRUE, random.order = FALSE, max.words = 150)
library(igraph)
## create from-to data frame representing retweet/mention/reply connections
tweets_net = network_data(my_dt,"mention")
## view edge data frame tweets_net ## view user_id->screen_name index
all_names = as.data.frame(attr(tweets_net, "idsn"))
## (1) convert directly to graph object representing semantic network
tweets_graph_dir <- network_graph(my_dt,"mention")
tweets_graph_dir
## IGRAPH 7df2677 DN-- 326 153 --
## + attr: id (v/c), name (v/c), type (e/c)
## + edges from 7df2677 (vertex names):
## [1] michaelhingart ->elonmusk
## [2] r4rehmann ->elonmusk
## [3] martingilligan ->gavinjohnadams|elonmusk
## [4] FullyThoughtOut->sleepyhollowkid|BTS_twt|VikkiRossWrites
## [5] FullyThoughtOut->sleepyhollowkid
## [6] FullyThoughtOut->sleepyhollowkid
## [7] josephsamo ->elonmusk
## [8] josephsamo ->DoctorJack16|elonmusk
## + ... omitted several edges
Question 2
# Converting un directed graph
tweets_graph_undir <- as.undirected(tweets_graph_dir)
# Finding number of components and size
components <- igraph::clusters(tweets_graph_undir, mode="weak")
#components
#components_each <- components(tweets_graph_undir)
# ID og biggest component
biggest_cluster_id <- which.max(components$csize)
vert_ids <-...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here