Learn R Programming

geomnet (version 0.3.1)

football: College football games network (undirected)

Description

A list of two datasets, vertices and edges, containing data on Division I college football games in the Fall 2000 season. The variables are as follows:

Usage

football

Arguments

Format

A list of two data frames:

  • the edges data set consists of three variables of length 613:

    • from, to: Character variables describing the teams playing in the game

    • same.conf: An indicator variable that is 1 if the two teams are in the same conference and 0 otherwise.

  • the vertices data set consists of two variables with information on 115 Division I schools:

    • label: Character variable containing the school names

    • value: Character variable containing the conference of the schools

References

M. Girvan and M. E. J. Newman, Proc. Natl. Acad. Sci. USA 99, 7821-7826 (2002).

Examples

Run this code
# NOT RUN {
# data step: merge vertices and edges
ftnet <- merge(
  football$edges, football$vertices,
  by.x = "from", by.y = "label", all = TRUE
)

# label independent schools
ftnet$schools <- ifelse(ftnet$value == "Independents", ftnet$from, "")

library(geomnet)
library(dplyr)
# create data plot
ggplot(data = ftnet,
       aes(from_id = from, to_id = to)) +
  geom_net(
    aes(
      colour = value, group = value,
      linetype = factor(1-same.conf),
      label = schools
    ),
    linewidth = 0.5,
    size = 5, vjust = -0.75, alpha = 0.3,
    layout.alg = 'fruchtermanreingold'
  ) +
  theme_net() +
  theme(legend.position = "bottom") +
  scale_colour_brewer("Conference", palette = "Paired")
# }

Run the code above in your browser using DataLab