Dance Moms Mention Network

A Mention network is used to understand how various users interact with each other by drawing a connection between the mentioning user and the mentioned user. The more often a user mentions another user, the stronger the correlation. This network will allow us to find connections between users and groups that tend to interact with each other.

The primary use of a mention network is to analyze patterns of communication on Twitter, identify important users or “hubs” in the network, find groups of users who tend to interact with each other frequently or “communities,” and categorize user accounts based on their interactions with others. By analyzing this network, one can understand which users are frequently interacting with each other with the hash tag Dance Moms.

This is a case study of the hashtag-mention network of #DanceMoms on Twitter. We first need to load the R packages. I would like to potentially evaluate if the user mentions of the hastag align the the decline interest in the show.

library(tidyverse)
library(ggplot2)
library(igraph)
library(rtweet)
library(jsonlite)

Let’s first use the rtweet package to collect the most recent tweets containing the #DanceMoms hashtag, create a mention network, perform network analysis, and visualize the network using the igraph package.

Now we will use code to construct a mention network. After, I will conduct a network analysis to determine the most noteworthy Twitter users using the hashtag “Dance Moms” present in the network.

mentions <- tweets %>% 
  select(screen_name, mentions_screen_name) %>% 
  filter(!mentions_screen_name == "NA")

mentions <- mentions %>% 
  separate_rows(mentions_screen_name, sep = ",") %>% 
  filter(!mentions_screen_name == "")

mentions_net <- mentions %>% 
  group_by(screen_name, mentions_screen_name) %>% 
  summarize(weight = n()) %>% 
  ungroup()

mentions_net <- mentions %>% 
  group_by(screen_name, mentions_screen_name) %>% 
  summarize(weight = n()) %>% 
  ungroup()


# rename columns to source and target
colnames(mentions_net)[1:2] <- c("source", "target")

#export the mention network
write.csv(mentions_net, "~/Desktop/Applied MA/DanceMoms_mention.csv", row.names=FALSE)

We have hundreds of nodes for this hashtag indicating that is fairly popular or relevant at the moment.

Below, I created a graph based off the data set collected via code. This graph is a more presentable way to look at the table and evaluate indegree and outdegree centrality within the directed network. This means that the ties have direction and some ties are directed towards the nodes and some are ties that the nodes direct to others. Both are vital for understanding this type of network.

# create directed graph
graph_mentions <- graph_from_data_frame(mentions_net, directed = TRUE)

# Aggregate graph information
graph_info_me <- data.frame(
  Nodes = vcount(graph_mentions),
  Edges = ecount(graph_mentions) ,
  Avg_Link_Weight = ecount(graph_mentions)/vcount(graph_mentions),
  Density = edge_density(graph_mentions , loops = FALSE))

# View graph information
graph_info_me
  Nodes Edges Avg_Link_Weight     Density
1   139   131        0.942446 0.006829319
# calculate centrality measures
degree_um <- data.frame(name = V(graph_mentions)$name, degree = degree(graph_mentions, mode = "total"))
indegree_um <- data.frame(name = V(graph_mentions)$name, indegree = degree(graph_mentions, mode = "in"))
outdegree_um <- data.frame(name = V(graph_mentions)$name, outdegree = degree(graph_mentions, mode = "out"))
closeness_um <- data.frame(name = V(graph_mentions)$name, closeness = closeness(graph_mentions, mode = "total"))
betweenness_um <- data.frame(name = V(graph_mentions)$name, betweenness = betweenness(graph_mentions, directed = FALSE, normalized = TRUE))
eigenvector_um <- data.frame(name = V(graph_mentions)$name, eigenvector = eigen_centrality(graph_mentions, directed = FALSE)$vector)

# combine into a single dataframe
centrality_um <- merge(degree_um, indegree_um, by = "name", all = TRUE)
centrality_um <- merge(centrality_um, outdegree_um, by = "name", all = TRUE)
centrality_um <- merge(centrality_um, closeness_um, by = "name", all = TRUE)
centrality_um <- merge(centrality_um, betweenness_um, by = "name", all = TRUE)
centrality_um <- merge(centrality_um, eigenvector_um, by = "name", all = TRUE)

This code allows us to see that there are not many nodes that interact as in-degree or out-degree relationships but users tend to crowd together and interact with one another and not many outside sources.

Here I provide code that calculates centrality measures which is essential to understand networks, or any given node.

# plot the top 10 nodes for different centrality measure
top_degree_um <- head(centrality_um[order(-centrality_um$degree),], 10)
top_indegree_um <- head(centrality_um[order(-centrality_um$indegree),], 10)
top_outdegree_um <- head(centrality_um[order(-centrality_um$outdegree),], 10)
top_closeness_um <- head(centrality_um[order(-centrality_um$closeness),], 19)
top_betweenness_um <- head(centrality_um[order(-centrality_um$betweenness),], 10)
top_eigenvector_um <- head(centrality_um[order(-centrality_um$eigenvector),], 10)

ggplot(top_indegree_um, aes(x = reorder(name, indegree), y = indegree, fill = indegree)) +
  geom_bar(stat = "identity") +
  ggtitle("Top 10 nodes by indegree centrality") +
  xlab("Node") +
  ylab("indegree") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5))

In this visualization, I see that @Solymasdanza interacts with the hashtag the most as it is the highest node. Other users that have a number of interactions with this hashtag and other users are @Abby_Lee_Miller, @Celonotdeadyet, and @DanceMoms.

Dance Moms is an unscripted reality TV program where a group of moms follow their young daughters through a competition dance journey of a lifetime.

@Abby_Lee_Miller and @DanceMoms are both directly related to the show Dance Moms that we are evaluating as the Dance Moms account is owned by LifeTime TV and the Abby Lee Miller account is the personal and professional account of the dance studio and Dance Moms franchise.

@Solymasdanza looks to be an interested follower with a connection to dance as her biography is “#Dance #Art #Music #love #peace.” She looks to post a lot and may use her account as a fan page.

When looking at the account of @Celonotdeadyet, it appears to be a personal account of another person interested in Dance Moms memes and old clips. They also post other humorous content so I would assume they are interested in making people laugh through a relatable hashtag.

Now, let’s see the network visualizations from Gephi.

Dance Moms Mention Network

The Dance Moms mentions visualization reveals a broad variety of Twitter users that mention this hash-tag. It shows a lot of different accounts that mention #DanceMoms about the same amount of times and then two users that mention is exponentially more than the others– @Solymasdanza and as expected, the show’s star, @Abby_Lee_Miller.

This may show that the conversation surrounding the reality show, Dance Moms, may be initiated by fans and fan accounts rather than the girls who starred in the show. I figured that the users mentioning #DanceMoms would be the dancers from the show and their moms, but this doesn’t seem to be the case. This also may allude to the fact that the show has had a decrease in popularity over recent years.