Description Usage Format Examples
A list of two datasets, vertices and edges, containing data on boys' soccer games at Iowa high schools in the 2011-2014 seasons. This dataset was compiled by Danny Bero (bero.danny@gmail.com). The variables are as follows:
1 |
A list of two data frames:
the edges data set consists of 11 variables of length 4484:
sub: Integer variable with the subregion of the state the school is in (1-8)
home: Factor variable containing the home team school
season: Integer variable with the year the game was played
week: Integer variable with the week of the season the game was played
date: Factor variable containing the date the game was played
away: Factor variable containing the away team school
ha: Factor variable stating if the first team is the home team, away team, or neutral?
result: Factor variable stating if the home team won, lost, or tied?
score: Factor variable with game final score, home team first
diff: Integer variable with home team score minus away team score
same_div: An indicator variable that is 1 if the schools are in the same division and 0 otherwise
the vertices data set consists of two variables with information on 157 schools:
div: Factor variable with division school is in (1, 2, or 3A)
label: Factor variable with school name
1 2 3 4 5 6 7 8 9 10 11 | # 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()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.