soccer: High school boys' soccer games in Iowa (undirected)

Description Usage Format Examples

Description

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 ([email protected]). The variables are as follows:

Usage

1

Format

A list of two data frames:

Examples

 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()

Example output

Loading required package: ggplot2

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

geomnet documentation built on May 29, 2017, 9:10 a.m.