Plotting Metrics Over Time
We can also examine how metrics for the overall graph change (or don't) through time. Earlier we looked at two important ones, clustering and reciprocity. Each were quite high, as we expected after visually inspecting the graph structure. However, over time, each of these might change. Are global purchasing patterns on Amazon stable? If we think so, then we expect plots of these metrics to essentially be horizontal lines, indicating that reciprocity is about the same every day and there's a high degree of clustering structure. Let's see what we can find here.
Code to calculate the transitivity by graph is shown.
Diese Übung ist Teil des Kurses
Case Studies: Network Analysis in R
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Examine this code
transitivity_by_graph <- data.frame(
date = d,
metric = "transitivity",
score = sapply(all_graphs, transitivity)
)
# Calculate reciprocity by graph
reciprocity_by_graph <- data.frame(
date = ___,
metric = ___,
score = ___ )