Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

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

1 answer below »
Answered 9 days After Jun 01, 2022

Solution

Mohd answered on Jun 09 2022
75 Votes
Twitter Data Analysis(Elon Musk takeover of twitter)
Twitter Data Analysis(Elon Musk takeover of twitter)
Varsha Gowda
6/4/2022
li
ary(readr)
li
ary(dplyr)
li
ary(rmarkdown)
li
ary(magrittr)
li
ary(tidytext)
li
ary(textdata)
li
ary(rtweet)
my_dt <- read_csv("New folder (3)/my_dt.csv")
WordCloud
li
ary(wordcloud)
wordcloud(my_dt$text,min.freq =2,scale=c(7,0.5),colors=
ewer.pal(8, "Dark2"), random.color= TRUE, random.order = FALSE, max.words = 150)
li
ary(igraph)
## create from-to data frame representing retweet/mention
eply 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_di
## 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
iggest_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