soccer: High school boys' soccer games in Iowa (undirected) In geomnet: Network Visualization in the 'ggplot2' Framework

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 (bero.danny@gmail.com). The variables are as follows:

Usage

 `1` ```soccer ```

Format

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

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 Nov. 26, 2020, 5:07 p.m.