Build the network

This network represents connections between a fitness-apparel brand and its customers. Each node represents the brand or a customer, and each line represents a connection.

g_mkt <- graph_from_literal(
  Brand-Ava-Ben-Cara,
  Brand-Cara,
  Ava-Dan:Eli:Fay,
  Ben-Gus,
  Cara-Hal:Ivy,
  Dan-Eli,
  Fay-Gus,
  Hal-Ivy-Jon,
  Brand-Kim-Jon
)

Task 1: Visualize the network

set.seed(123)

plot(
  g_mkt,
  vertex.color = "lightblue",
  vertex.label.color = "black",
  vertex.size = 28,
  vertex.label.cex = 0.9,
  edge.color = "gray50",
  main = "Fitness-Apparel Referral Network"
)

Answer

Ava, Cara, and Brand appear central because of their connections, but centrality calculations give a more reliable comparison. Ava–Dan–Eli and Cara–Hal–Ivy form cliques because everyone in each group is directly connected. The code below finds cliques with at least three nodes.

clique_groups <- max_cliques(g_mkt, min = 3)

lapply(
  clique_groups,
  function(group) as_ids(group)
)
## [[1]]
## [1] "Ava" "Dan" "Eli"
## 
## [[2]]
## [1] "Cara" "Hal"  "Ivy"

Task 2: Compare centrality measures

Derr (2021) says that degree counts how direct links a node has. Closeness shows how close a node is to all the others in the network. Betweenness looks at how a node lies on the shortest paths between other nodes.

Ava has the connections. Five in total. Cara comes next with four. Ava and Brand both have the closeness score of 0.050. Ben and Cara are behind each around 0.048. Ava also leads in betweenness with a score of 25.83. Cara is second with 18.17 and Brand follows with 17.00.

The rankings match a bit since Ava is top in all three. She even ties for top in closeness.. Then Kim has fewer connections than Ivy yet Kim has higher betweenness. That means having more connections doesn’t always mean someone is the best connector. Sometimes a person with links can still be more central, in linking others.

centrality_raw <- data.frame(
  person = V(g_mkt)$name,
  degree = as.numeric(degree(g_mkt)),
  closeness = as.numeric(
    closeness(g_mkt, normalized = FALSE)
  ),
  betweenness = as.numeric(
    betweenness(g_mkt, normalized = FALSE)
  )
)
# Calculate ranks before rounding the values.
centrality_df <- centrality_raw %>%
  mutate(
    degree_rank = min_rank(desc(degree)),
    closeness_rank = min_rank(desc(closeness)),
    betweenness_rank = min_rank(desc(betweenness))
  ) %>%
  arrange(desc(betweenness)) %>%
  mutate(
    closeness = round(closeness, 3),
    betweenness = round(betweenness, 2)
  )

knitr::kable(
  centrality_df,
  caption = "Centrality Scores and Rankings"
)
Centrality Scores and Rankings
person degree closeness betweenness degree_rank closeness_rank betweenness_rank
Ava 5 0.050 25.83 1 1 1
Cara 4 0.048 18.17 2 3 2
Brand 3 0.050 17.00 3 1 3
Ben 3 0.048 13.33 3 3 4
Kim 2 0.037 5.00 6 5 5
Ivy 3 0.037 4.50 3 5 6
Fay 2 0.036 2.17 6 7 7
Gus 2 0.034 1.50 6 8 8
Jon 2 0.033 1.50 6 12 8
Dan 2 0.034 0.00 6 8 10
Eli 2 0.034 0.00 6 8 10
Hal 2 0.034 0.00 6 8 10

Display the rankings separately:

# Degree ranking
centrality_df %>%
  arrange(degree_rank) %>%
  select(person, degree, degree_rank) %>%
  knitr::kable(caption = "Degree Ranking")
Degree Ranking
person degree degree_rank
Ava 5 1
Cara 4 2
Brand 3 3
Ben 3 3
Ivy 3 3
Kim 2 6
Fay 2 6
Gus 2 6
Jon 2 6
Dan 2 6
Eli 2 6
Hal 2 6
# Closeness ranking
centrality_df %>%
  arrange(closeness_rank) %>%
  select(person, closeness, closeness_rank) %>%
  knitr::kable(caption = "Closeness Ranking")
Closeness Ranking
person closeness closeness_rank
Ava 0.050 1
Brand 0.050 1
Cara 0.048 3
Ben 0.048 3
Kim 0.037 5
Ivy 0.037 5
Fay 0.036 7
Gus 0.034 8
Dan 0.034 8
Eli 0.034 8
Hal 0.034 8
Jon 0.033 12
# Betweenness ranking
centrality_df %>%
  arrange(betweenness_rank) %>%
  select(person, betweenness, betweenness_rank) %>%
  knitr::kable(caption = "Betweenness Ranking")
Betweenness Ranking
person betweenness betweenness_rank
Ava 25.83 1
Cara 18.17 2
Brand 17.00 3
Ben 13.33 4
Kim 5.00 5
Ivy 4.50 6
Fay 2.17 7
Gus 1.50 8
Jon 1.50 8
Dan 0.00 10
Eli 0.00 10
Hal 0.00 10

Task 3: Choose two seed customers

Answer

I would choose Ava and Cara for the free samples. Ava has five connections and a betweenness of 25.83, while Cara has four connections and a betweenness of 18.17. They rank first and second among customers on both measures.

Charan (n.d.) explains that betweenness identifies nodes connecting different sections of a network. Applying this idea, Ava and Cara could help spread information to different groups: Ava connects directly to Dan, Eli, and Fay, while Cara connects directly to Hal and Ivy. Their high degree and betweenness support choosing them, although these scores cannot guarantee actual referrals.

Network interpretation

The supplied graph is undirected. Its edges represent connections without specifying a one-way direction of influence. Therefore, these results describe potential reach and network position rather than proving who influences whom.

References

Charan, A. (n.d.). Centrality measures in topic network analysis. MarketingMind. https://www.ashokcharan.com/Marketing-Analytics/~sma-centrality-measures.php

Derr, A. (2021, April 16). Network centrality: Understanding degree, closeness & betweenness centrality. Visible Network Labs. https://visiblenetworklabs.com/2021/04/16/understanding-network-centrality/