Type: Package
Title: Michigan State University (MSU) Palettes and Themes
Version: 1.0.0
Maintainer: Emilio Xavier Esposito <emilio.esposito@gmail.com>
Description: Defines colour palettes and themes for Michigan State University (MSU) publications and presentations. Palettes and themes are supported in both base R and 'ggplot2' graphics, and are intended to provide consistency between those creating documents and presentations.
License: CC BY-SA 4.0
Encoding: UTF-8
RoxygenNote: 7.3.3
Depends: R (≥ 4.1)
Imports: ggplot2, graphics, grDevices, purrr, showtext, sysfonts, systemfonts
Suggests: covr, devtools, ggrepel, scales, dplyr, knitr, markdown, quarto, rmarkdown, testthat (≥ 3.0.0)
VignetteBuilder: quarto
URL: https://github.com/emilioxavier/MSUthemes, https://emilioxavier.github.io/MSUthemes/
BugReports: https://github.com/emilioxavier/MSUthemes/issues
LazyData: true
NeedsCompilation: no
Packaged: 2025-10-13 20:25:05 UTC; emilio
Author: Emilio Xavier Esposito ORCID iD [aut, cre, cph] (GitHub: https://github.com/emilioxavier), Nicola Rennie [aut], Michigan State University [fnd]
Repository: CRAN
Date/Publication: 2025-10-17 20:30:02 UTC

Big Ten Conference Institutional Data (1996-2023)

Description

A comprehensive dataset containing institutional characteristics, enrollment data, financial information, and demographic composition for all Big Ten Conference member institutions from 1996 to 2023. This dataset tracks the evolution of these universities over nearly three decades, including data for institutions that joined the conference at different times.

Usage

BigTen

Format

A data frame with 504 rows and 38 variables:

name

Character. Institution name (e.g., "MSU", "Michigan", "Ohio State")

Landgrant.tf

Logical. Whether the institution is a land-grant university

Public.tf

Logical. Whether the institution is public (TRUE) or private (FALSE)

AAU.tf

Logical. Whether the institution is a member of the Association of American Universities

entry_term

Numeric. Year the data entry corresponds to (1996-2023)

UGDS

Integer. Total undergraduate enrollment

ADM_RATE

Numeric. Admission rate (proportion of applicants admitted)

C150_4

Numeric. Completion rate for first-time, full-time students (150% of expected time)

PCTPELL

Numeric. Percentage of undergraduates receiving Pell grants

n.pell

Integer. Number of undergraduates receiving Pell grants

TUITIONFEE_IN

Integer. In-state tuition and fees

TUITIONFEE_OUT

Integer. Out-of-state tuition and fees

TUITFTE

Integer. Net tuition revenue per full-time equivalent student

BOOKSUPPLY

Integer. Average cost of books and supplies

ROOMBOARD_ON

Integer. Average cost of room and board for on-campus students

OTHEREXPENSE_ON

Integer. Other expenses for on-campus students

OTHEREXPENSE_FAM

Integer. Other expenses for students living with family

CoA.inState

Integer. Total cost of attendance for in-state students

CoA.outState

Integer. Total cost of attendance for out-of-state students

otherCosts.tot

Integer. Total other costs

fte.tot

Integer. Total full-time equivalent tuition plus other costs

fte.in.rat

Numeric. Ratio of full-time equivalent tuition plus other costs to in-state to total costs

UGDS_WHITE

Numeric. Proportion of white undergraduate students

UGDS_BLACK

Numeric. Proportion of Black undergraduate students

UGDS_HISP

Numeric. Proportion of Hispanic undergraduate students

UGDS_ASIAN

Numeric. Proportion of Asian undergraduate students

UGDS_AIAN

Numeric. Proportion of American Indian/Alaska Native undergraduate students

UGDS_NHPI

Numeric. Proportion of Native Hawaiian/Pacific Islander undergraduate students

UGDS_2MOR

Numeric. Proportion of students of two or more races

UGDS_NRA

Numeric. Proportion of non-resident alien undergraduate students

UGDS_UNKN

Numeric. Proportion of students with unknown race/ethnicity

UGDS_WHITENH

Numeric. Proportion of white non-Hispanic undergraduate students

UGDS_BLACKNH

Numeric. Proportion of Black non-Hispanic undergraduate students

UGDS_API

Numeric. Proportion of Asian/Pacific Islander undergraduate students

UGDS_AIANOLD

Numeric. Proportion of American Indian/Alaska Native students (legacy coding)

UGDS_HISPOLD

Numeric. Proportion of Hispanic students (legacy coding)

UGDS_MEN

Numeric. Proportion of male undergraduate students

UGDS_WOMEN

Numeric. Proportion of female undergraduate students

Details

The dataset includes all 18 current Big Ten Conference members:

Data availability varies by year and institution. Earlier years (especially 1996-2000) may have limited data for some variables. Financial data and demographic breakdowns became more standardized and complete in later years.

The dataset is particularly useful for:

Source

Compiled from multiple institutional and federal data sources including the Integrated Postsecondary Education Data System (IPEDS) and institutional reports. Data spans 1996-2023. The dataset is a subset of the College Scorecard dataset (https://collegescorecard.ed.gov/data/), focusing on Big Ten institutions.

See Also

bigten_colors_primary, bigten_colors_secondary for Big Ten institutional color palettes that correspond to the institutions in this dataset.

Examples

# Load the dataset
data(BigTen)

# View structure
str(BigTen)

# Check institutions included
unique(BigTen$name)

# Examine enrollment trends over time
if (require(ggplot2)) {
  library(ggplot2)
  BigTen_recent <- subset(BigTen, entry_term >= 2010 & !is.na(UGDS))
  ggplot(BigTen_recent, aes(x = entry_term, y = UGDS, color = name)) +
    geom_line() +
    scale_color_bigten_d(palette = "primary") +
    theme_MSU() +
    labs(title = "Big Ten Undergraduate Enrollment Trends",
         x = "Year", y = "Undergraduate Enrollment")
}

# Compare public vs private institutions
table(unique(BigTen[c("name", "Public.tf")])$Public.tf)


Generates the colour palettes

Description

Generates the colour palettes

Usage

MSUcols(palette, n, type = "discrete", direction = 1)

Arguments

palette

Name of Palette. Run names(MSUpalettes) to view options.

n

Number of desired colors. If number of requested colors is beyond the scope of the palette, colors are automatically interpolated. If n is not provided, the length of the palette is used.

type

Either "continuous" or "discrete". Use continuous if you want to automatically interpolate between colors. Default "discrete"

direction

Sets order of colors. Default palette is 1. If direction is -1, palette color order is reversed

Value

A character vector of hex colour codes.

Examples

MSUcols("msu_seq")

MSU palettes and MSU color variables

Description

This file contains only MSU palettes and MSU colour variables.

Usage

MSUpalettes

Format

An object of class list of length 11.


Named vector of Big Ten primary colors for reliable institution matching

Description

Named vector of Big Ten primary colors for reliable institution matching

Usage

bigten_colors_primary

Format

An object of class character of length 21.


Named vector of Big Ten secondary colors for reliable institution matching

Description

Named vector of Big Ten secondary colors for reliable institution matching

Usage

bigten_colors_secondary

Format

An object of class character of length 21.


Big Ten Institution Primary & Sceondary Color Palette

Description

Get Big Ten colors for specific institutions

Usage

get_bigten_colors(institutions, type = "primary")

Arguments

institutions

Character vector of institution names (should match names in bigten_colors_primary)

type

Either "primary" or "secondary" colors

Value

Named character vector of hex colors

Examples

# Get primary colors for specific institutions
get_bigten_colors(c("Michigan", "Ohio State", "MSU"))

# Get secondary colors
get_bigten_colors(c("Michigan", "Northwestern"), type = "secondary")

# Use in ggplot with scale_fill_manual
library(ggplot2)
my_colors <- get_bigten_colors(c("Michigan", "Ohio State", "MSU"))
BigTenData <- data.frame(
  institution = c("Michigan", "Ohio State", "MSU"),
  value = c(10, 15, 20)
)
ggplot(data=BigTenData) +
  geom_bar(aes(x = institution, y = value, fill = institution),
           stat="identity") +
  scale_fill_manual(values = my_colors)

MSU Excellence Green hex colour

Description

MSU Excellence Green hex colour

Usage

msu_Excellence

Format

An object of class character of length 1.


MSU Kelly Green hex colour

Description

MSU Kelly Green hex colour

Usage

msu_Kelly

Format

An object of class character of length 1.


MSU Lime Green hex colour

Description

MSU Lime Green hex colour

Usage

msu_Lime

Format

An object of class character of length 1.


MSU Refresh Green hex colour

Description

MSU Refresh Green hex colour

Usage

msu_Refresh

Format

An object of class character of length 1.


MSU black hex colour

Description

MSU black hex colour

Usage

msu_black

Format

An object of class character of length 1.


MSU blue (aka blue-grey or blue-gray) hex colour

Description

MSU blue (aka blue-grey or blue-gray) hex colour

Usage

msu_blue

Format

An object of class character of length 1.


MSU dark grey hex colour

Description

MSU dark grey hex colour

Usage

msu_darkgrey

Format

An object of class character of length 1.


MSU Spartan Green hex colour

Description

MSU Spartan Green hex colour

Usage

msu_green

Format

An object of class character of length 1.


MSU grey/gray hex colour

Description

MSU grey/gray hex colour

Usage

msu_grey

Format

An object of class character of length 1.


MSU orange hex colour

Description

MSU orange hex colour

MSU (burnt) orange hex colour

Usage

msu_orange

msu_orange

Format

An object of class character of length 1.

An object of class character of length 1.


MSU peach hex colour

Description

MSU peach hex colour

Usage

msu_peach

Format

An object of class character of length 1.


MSU purple hex colour

Description

MSU purple hex colour

Usage

msu_purple

Format

An object of class character of length 1.


MSU red hex colour

Description

MSU red hex colour

Usage

msu_red

Format

An object of class character of length 1.


MSU split pea hex colour

Description

MSU split pea hex colour

Usage

msu_splitpea

Format

An object of class character of length 1.


MSU teal hex colour

Description

MSU teal hex colour

Usage

msu_teal

Format

An object of class character of length 1.


MSU white hex colour

Description

MSU white hex colour

Usage

msu_white

Format

An object of class character of length 1.


MSU yellow (aka yellow-green or grellow) hex colour

Description

MSU yellow (aka yellow-green or grellow) hex colour

Usage

msu_yellow

Format

An object of class character of length 1.


Function for printing palette

Description

Function for printing palette

Usage

## S3 method for class 'palette'
print(x, ...)

Arguments

x

the object to be printed.

...

further arguments to be passed to or from other methods. They are ignored in this function.

Value

A plot of the specified colour palette.

Examples

print(MSUcols("msu_qual1"))

Plotting with Big Ten palettes for colour ggplot2

Description

Plotting with Big Ten palettes for colour ggplot2

Usage

scale_color_bigten_c(palette = "primary", direction = 1, ...)

Arguments

palette

Type of palette: "primary" or "secondary"

direction

Sets order of colors. Default is 1. If direction is -1, palette color order is reversed

...

Other arguments passed on to scale_color_gradientn

Value

A ggproto object defining a continuous colour scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, color = wt)) +
  geom_point() +
  scale_color_bigten_c(palette = "primary")

Plotting with Big Ten palettes for colour ggplot2

Description

Plotting with Big Ten palettes for colour ggplot2

Usage

scale_color_bigten_d(palette = "primary", direction = 1, ...)

Arguments

palette

Type of palette: "primary" or "secondary"

direction

Sets order of colors. Default direction is 1. If direction is -1, palette color order is reversed

...

Other arguments passed on to discrete_scale

Value

A ggproto object defining a discrete colour scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, color = factor(cyl))) +
  geom_point() +
  scale_color_bigten_d(palette = "primary")

Plotting with MSU palettes for colour ggplot2

Description

Plotting with MSU palettes for colour ggplot2

Usage

scale_color_msu_c(palette, direction = 1, ...)

Arguments

palette

name of palette. Run names(MSUpalettes) to view options.

direction

Sets order of colors. Default palette_choice is 1. If direction is -1, palette_choice color order is reversed

...

Other arguments passed on to scale_color_gradientn

Value

A ggproto object defining a continuous colour scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, color = wt)) +
  geom_point() +
  scale_color_msu_c(palette = "msu_seq")

Plotting with MSU palettes for colour ggplot2

Description

Plotting with MSU palettes for colour ggplot2

Usage

scale_color_msu_d(palette, direction = 1, ...)

Arguments

palette

Name of Palette. Run palettes(MSUpalettes) to view options.

direction

Sets order of colors. Default direction is 1. If direction is -1, palette color order is reversed

...

Other arguments passed on to discrete_scale

Value

A ggproto object defining a discrete colour scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, color = factor(cyl))) +
  geom_point() +
  scale_color_msu_d(palette = "msu_qual1")

Plotting with Big Ten palettes for colour ggplot2 (British spelling)

Description

Plotting with Big Ten palettes for colour ggplot2 (British spelling)

Usage

scale_colour_bigten_c(palette = "primary", direction = 1, ...)

Arguments

palette

Type of palette: "primary" or "secondary"

direction

Sets order of colors. Default is 1. If direction is -1, palette color order is reversed

...

Other arguments passed on to scale_color_gradientn

Value

A ggproto object defining a continuous colour scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, colour = wt)) +
  geom_point() +
  scale_colour_bigten_c(palette = "primary")

Plotting with Big Ten palettes for colour ggplot2 (British spelling)

Description

Plotting with Big Ten palettes for colour ggplot2 (British spelling)

Usage

scale_colour_bigten_d(palette = "primary", direction = 1, ...)

Arguments

palette

Type of palette: "primary" or "secondary"

direction

Sets order of colors. Default direction is 1. If direction is -1, palette color order is reversed

...

Other arguments passed on to discrete_scale

Value

A ggproto object defining a discrete colour scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, colour = factor(cyl))) +
  geom_point() +
  scale_colour_bigten_d(palette = "primary")

Plotting with MSU palettes for colour ggplot2

Description

Plotting with MSU palettes for colour ggplot2

Usage

scale_colour_msu_c(palette, direction = 1, ...)

Arguments

palette

name of palette. Run names(MSUpalettes) to view options.

direction

Sets order of colors. Default palette_choice is 1. If direction is -1, palette_choice color order is reversed

...

Other arguments passed on to scale_color_gradientn

Value

A ggproto object defining a continuous colour scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, color = wt)) +
  geom_point() +
  scale_colour_msu_c(palette = "msu_seq")

Plotting with MSU palettes for colour ggplot2

Description

Plotting with MSU palettes for colour ggplot2

Usage

scale_colour_msu_d(palette, direction = 1, ...)

Arguments

palette

Name of Palette. Run names(MSUpalettes) to view options.

direction

Sets order of colors. Default direction is 1. If direction is -1, palette color order is reversed

...

Other arguments passed on to discrete_scale

Value

A ggproto object defining a discrete colour scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, color = factor(cyl))) +
  geom_point() +
  scale_colour_msu_d(palette = "msu_qual1")

Plotting with Big Ten palettes for fill ggplot2

Description

Plotting with Big Ten palettes for fill ggplot2

Usage

scale_fill_bigten_c(palette = "primary", direction = 1, ...)

Arguments

palette

Type of palette: "primary" or "secondary"

direction

Sets order of colors. Default is 1. If direction is -1, palette color order is reversed

...

Other arguments passed on to scale_fill_gradientn

Value

A ggproto object defining a continuous fill scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, fill = wt)) +
  geom_point(shape = 21) +
  scale_fill_bigten_c(palette = "primary")

Plotting with Big Ten palettes for fill ggplot2

Description

Plotting with Big Ten palettes for fill ggplot2

Usage

scale_fill_bigten_d(palette = "primary", direction = 1, ...)

Arguments

palette

Type of palette: "primary" or "secondary"

direction

Sets order of colors. Default direction is 1. If direction is -1, palette color order is reversed

...

Other arguments passed on to discrete_scale

Value

A ggproto object defining a discrete fill scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, fill = factor(cyl))) +
  geom_point(shape = 21) +
  scale_fill_bigten_d(palette = "primary")

Plotting with MSU palettes for fill with ggplot2

Description

Plotting with MSU palettes for fill with ggplot2

Usage

scale_fill_msu_c(palette, direction = 1, ...)

Arguments

palette

name of palette. Run names(MSUpalettes) to view options.

direction

Sets order of colors. Default palette_choice is 1. If direction is -1, palette_choice color order is reversed

...

Other arguments passed on to scale_fill_gradientn

Value

A ggproto object defining a continuous colour scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = cyl, y = disp, fill = cyl)) +
  geom_col() +
  scale_fill_msu_c(palette = "msu_seq")

Plotting with MSU palettes for fill colour ggplot2

Description

Plotting with MSU palettes for fill colour ggplot2

Usage

scale_fill_msu_d(palette, direction = 1, ...)

Arguments

palette

name of palette. Run names(MSUpalettes) to view options.

direction

Sets order of colors. Default direction is 1. If direction is -1, palette_choice color order is reversed

...

Other arguments passed on to discrete_scale

Value

A ggproto object defining a discrete fill scale for use with ggplot2.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = cyl, y = disp, fill = factor(cyl))) +
  geom_col() +
  scale_fill_msu_d(palette = "msu_qual1")

Set MSU base R plotting palette

Description

Set MSU base R plotting palette

Usage

set_msu_palette(palette)

Arguments

palette

Name of palette. See names(MSUthemes::MSUpalettes).

Value

Returns a character vector giving the colors from the palette which was in effect. This is invisible unless the argument is omitted.

Examples

set_msu_palette("msu_qual1")

Set MSUthemes base R graphical parameters

Description

Set MSUthemes base R graphical parameters

Usage

set_msu_par(
  family = "Metropolis",
  adj = 0,
  mar = c(5, 3, 3, 2.5),
  bty = "n",
  ...
)

Arguments

family

Font used for all text elements. Default "Metropolis".

adj

Alignment of text for title. Default 0.

mar

Margins. Default c(5, 3, 3, 2.5).

bty

Axis lines. Default "n".

...

Additional arguments passed to par

Value

Returns an invisible named list.

Examples

# save user's current par values that this function will change
oldpar <- par("family", "adj", "mar", "bty")
set_msu_par()
plot(1:4, 1:4, col=1:4, main = "Title")
par(oldpar)

Michigan State University (MSU) Theme

Description

Custom ggplot2 theme

Usage

theme_MSU(
  base_size = 11,
  base_family = "Metropolis",
  header_family = NULL,
  base_line_size = base_size/22,
  base_rect_size = base_size/22,
  rel_small = 12/14,
  rel_tiny = 11/14,
  rel_large = 16/14,
  ink = "black",
  paper = "white",
  accent = "#3366FF"
)

Arguments

base_size

Base font size for text elements. Default 12.

base_family

Font used for all text elements. Default "Metropolis".

header_family

Font family for titles and headers. The default, NULL, uses theme inheritance to set the font. This setting affects axis titles, legend titles, the plot title and tag text.

base_line_size

Base line size is base_size/22

base_rect_size

Base rectangle size is base_size/22

rel_small

Relative size of small text (e.g., axis tick labels)

rel_tiny

Relative size of tiny text (e.g., caption)

rel_large

Relative size of large text (e.g., title)

ink

Text colour. Default "black".

paper

Background colour. Default "white".

accent

Accent colour. Default bright blue, "#3366FF"

Value

A ggplot2 theme

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, color = wt)) +
  geom_point() +
  theme_MSU()


Prints all available colour palettes

Description

Prints all available colour palettes

Usage

view_all_palettes()

Value

A plot of all colour palettes available in the package.

Examples

view_all_palettes()