# NOT RUN {
# prep the data
soccernet <- merge(soccer$edges, soccer$vertices, by.x = "home",
by.y = "label", all = TRUE)
library(geomnet)
library(dplyr)
# create plot
ggplot(data = soccernet, aes(from_id = home, to_id = away)) +
geom_net(aes(colour = div, group = div), ealpha = .25,
layout.alg = 'fruchtermanreingold') +
facet_wrap(~season) +
theme_net()
# }
Run the code above in your browser using DataLab