My network includes me, my mom Brittany, my dad Matthew, my husband Bailey, my son Walker, my mother-in-law Shelley, and my father-in-law Jeff. Everyone knows each other, so I represented these relationships as an undirected network.
family_names <- c(
"Kameron", "Brittany", "Bailey",
"Matthew", "Walker", "Shelley", "Jeff"
)
g_family <- make_full_graph(7, directed = FALSE)
V(g_family)$name <- family_names
plot(
g_family,
layout = layout_in_circle(g_family),
vertex.color = "lightblue",
vertex.size = 30,
vertex.label.color = "black",
vertex.label.cex = 0.9,
main = "My Family Network"
)
My graph is a complete network with seven people and 21 connections. Each person has six direct connections. Everyone has equal degree and closeness centrality, and everyone’s betweenness is zero because all pairs are directly connected. No single person is needed to connect others. The entire network forms one clique.
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
)
set.seed(123)
plot(
g_mkt,
vertex.color = "lightblue",
vertex.size = 25,
vertex.label.color = "black",
main = "Fitness Brand Social Network"
)
Ava and Cara stand out because they connect to several people and help connect different parts of the network. Brand and Ben also appear near the center of the graph. Two tightly connected groups are Ava, Dan, and Eli, and Cara, Hal, and Ivy. Each group forms a triangle because all three members connect directly to each other.
Although the scenario describes influence, the supplied code creates undirected connections. My interpretation follows that network.
centrality_df <- data.frame(
person = V(g_mkt)$name,
degree = degree(g_mkt),
closeness = round(closeness(g_mkt), 3),
betweenness = round(betweenness(g_mkt), 2),
row.names = NULL
)
centrality_df <- centrality_df[
order(-centrality_df$betweenness),
]
knitr::kable(
centrality_df,
digits = c(0, 0, 3, 2),
caption = "Network metrics ranked by betweenness"
)
| person | degree | closeness | betweenness | |
|---|---|---|---|---|
| 2 | Ava | 5 | 0.050 | 25.83 |
| 4 | Cara | 4 | 0.048 | 18.17 |
| 1 | Brand | 3 | 0.050 | 17.00 |
| 3 | Ben | 3 | 0.048 | 13.33 |
| 12 | Kim | 2 | 0.037 | 5.00 |
| 10 | Ivy | 3 | 0.037 | 4.50 |
| 7 | Fay | 2 | 0.036 | 2.17 |
| 8 | Gus | 2 | 0.034 | 1.50 |
| 11 | Jon | 2 | 0.033 | 1.50 |
| 5 | Dan | 2 | 0.034 | 0.00 |
| 6 | Eli | 2 | 0.034 | 0.00 |
| 9 | Hal | 2 | 0.034 | 0.00 |
Ava has the highest degree of 5 and the highest betweenness of approximately 25.83. Ava and Brand tie for the highest closeness at 0.050. Among the potential seed customers, Ava ranks highest on all three measures.
The rankings do not completely agree because each measure looks at a different aspect of the network. Degree counts direct connections. Closeness measures how near a node is to the rest of the network through shortest paths. Betweenness measures how often a node lies along the shortest paths connecting other nodes.
For example, Kim has only two direct connections but higher betweenness than Ivy, who has three. This shows that having more direct connections does not always mean someone has a stronger bridging role.
The closeness values in this table use igraph’s default unnormalized calculation.
I would give the free samples to Ava and Cara. Ava has the highest degree of 5 and the highest betweenness of 25.83. She can directly reach several people and also help information travel between different parts of the network.
Cara has the second-highest degree of 4 and the second-highest betweenness of 18.17. Her connections to Hal and Ivy help the campaign reach another tightly connected group. Choosing Ava and Cara would help the brand reach different groups instead of focusing all its efforts on one friend group.
These metrics support my choice, although actual referrals would also depend on whether people share the product and how their connections respond.