Task 1: Reflection

When I teach, I disucss dashboards at least two times with students - first at the beginning of a unit on evaluation and measurement and then again when we disucss analysis. I have typically used a photo of a dashboard from an MGB, in part because it was the first car I owned, and in part because it sort of gets at the good and bad of a dashboard.

A basic dashboard, circa 1973.
A basic dashboard, circa 1973.

An MGB dashboard includes some easly to understand items - speedometer, fuel - some that can be sort of easilty understood - tachometer, temperature - and some that take some insight - oil pressure. Put together, they help you monitor the car’s performance, and manage it’s use.

In my day job, we’ve been engaged in a dashboard project for the past 18 months, although the dashboards tend to be highly reductive and are more report cards than actual measures of actvity and progress. The process has been instructive insofar as it has made visible the gaps in our data as well as highlighted the data that we have historically collected that has not been utilized as it should be. While I am skeptical of the value of the larger dashboard project, the result has bene a fairly robust side project that has yeilded pretty impressive results.

Perhpas the biggest challenge in developing the dashboards has been the desire to 1) put too much into the device, which allows for more context, but also makes them so complex that an average user cannot easily uncover clear insights from them, and 2) to try to have one dashboard speak to the entirety of the instituion. Getting the balance right has involved conversations with a range of stakeholders and being willing to leave some pretty interesting insights “on the cutting room floor.”

Task 2: Interactive plots

library(tidyverse)
library(plotly)
library(readxl)
library(htmlwidgets)
library(scales)

# Load data here
summer_enrollment_data <- read.delim("data/SRPT9679_Enrollment_20231.csv", sep = "|") %>% select(SETID_CONSOL, INSTITUTION_NAME_CONSOL, ACADEMIC_TERM, STUDENT_INST_ID, DEGREE_LEVEL_CODE, AGE_AT_TERM, USG_CUM_GPA,INST_CUM_HRS_EARNED_TRANSFER, GENDER_CODE, IPEDS_RACE_DESCR)
fall_enrollment_data <- read.delim("data/SRPT9679_Enrollment_20232.csv", sep = "|") %>% select(SETID_CONSOL, INSTITUTION_NAME_CONSOL, ACADEMIC_TERM, STUDENT_INST_ID, DEGREE_LEVEL_CODE, AGE_AT_TERM, USG_CUM_GPA,INST_CUM_HRS_EARNED_TRANSFER, GENDER_CODE, IPEDS_RACE_DESCR)
spring_enrollment_data <- read.delim("data/SRPT9679_Enrollment_20234.csv", sep = "|") %>% select(SETID_CONSOL, INSTITUTION_NAME_CONSOL, ACADEMIC_TERM, STUDENT_INST_ID, DEGREE_LEVEL_CODE, AGE_AT_TERM, USG_CUM_GPA,INST_CUM_HRS_EARNED_TRANSFER, GENDER_CODE, IPEDS_RACE_DESCR)

# create one enrollment file
enrollment_2023<-rbind(summer_enrollment_data, fall_enrollment_data, spring_enrollment_data) %>% mutate(UNIQUE_ID = paste(SETID_CONSOL, STUDENT_INST_ID, sep="-")) %>% group_by(UNIQUE_ID) %>% distinct(UNIQUE_ID, .keep_all = TRUE) %>% select(-c(SETID_CONSOL, STUDENT_INST_ID)) %>% arrange(ACADEMIC_TERM)

summer_awards_data <- read_xlsx("data/srpt9681_Academic Affairs Data Dump Awards_20231.xlsx") %>% select(SETID_CONSOL, STUDENT_INST_ID, AWARD_TERM, CIP_CODE_DESCR) %>% mutate(across(1:3,as.numeric))
fall_awards_data <- read_xlsx("data/srpt9681_Academic Affairs Data Dump Awards_20232.xlsx") %>% select(SETID_CONSOL, STUDENT_INST_ID, AWARD_TERM, CIP_CODE_DESCR) %>% mutate(across(1:3,as.numeric))
spring_awards_data <- read_xlsx("data/srpt9681_Academic Affairs Data Dump Awards_20234.xlsx") %>% select(SETID_CONSOL, STUDENT_INST_ID, AWARD_TERM, CIP_CODE_DESCR) %>% mutate(across(1:3,as.numeric))

#create one awards file
awards_2023 <- rbind(summer_awards_data, fall_awards_data, spring_awards_data) %>% mutate(UNIQUE_ID = paste(SETID_CONSOL, STUDENT_INST_ID, sep="-"))%>% group_by(UNIQUE_ID) %>% distinct(UNIQUE_ID, .keep_all = TRUE)

grads_2023 <- merge(x=awards_2023, y=enrollment_2023, by.x = "UNIQUE_ID", by.y = "UNIQUE_ID", all.x = TRUE) %>% 
  mutate(USG_CUM_GPA = na_if(USG_CUM_GPA, 0)) %>%
  drop_na() %>% 
  mutate(Sector=recode(INSTITUTION_NAME_CONSOL, "Abraham Baldwin Agricultural College" = "State Colleges",
"Albany State University" = "State Universities",
"Atlanta Metropolitan State College" = "State Colleges",
"Augusta University" = "Research Universities",
"Clayton State University" = "State Universities",
"College of Coastal Georgia" = "State Colleges",
"Columbus State University" = "State Universities",
"Dalton State College" = "State Colleges",
"East Georgia State College" = "State Colleges",
"Fort Valley State University" = "State Universities",
"Georgia College & State University" = "State Universities",
"Georgia Gwinnett College" = "State Colleges",
"Georgia Highlands College" = "State Colleges",
"Georgia Institute of Technology" = "Research Universities",
"Georgia Southern University" = "Comprehensive Universities",
"Georgia Southwestern State University" = "State Universities",
"Georgia State University" = "Research Universities",
"Gordon State College" = "State Colleges",
"Kennesaw State University" = "Comprehensive Universities",
"Middle Georgia State University" = "State Universities",
"Savannah State University" = "State Universities",
"South Georgia State College" = "State Colleges",
"University of Georgia" = "Research Universities",
"University of North Georgia" = "State Universities",
"University of West Georgia" = "Comprehensive Universities",
"Valdosta State University" = "Comprehensive Universities",)) %>% relocate(Sector, .after = "INSTITUTION_NAME_CONSOL") %>% 
  mutate(Inst = recode(INSTITUTION_NAME_CONSOL, 
 "Abraham Baldwin Agricultural College"="ABAC",
"Albany State University"="ASU",
"Atlanta Metropolitan State College"="AMSC",
"Augusta University"="AU",
"Clayton State University"="ClaytonState",
"College of Coastal Georgia"="CCGa",
"Columbus State University"="CSU",
"Dalton State College"="DSC",
"East Georgia State College"="EGSC",
"Fort Valley State University"="FVSU",
"Georgia College & State University"="GCSU",
"Georgia Gwinnett College"="GGC",
"Georgia Highlands College"="GHC",
"Georgia Institute of Technology"="GaTech",
"Georgia Southern University"="GaSou",
"Georgia Southwestern State University"="GSW",
"Georgia State University"="GSU",
"Gordon State College"="GSC",
"Kennesaw State University"="KSU",
"Middle Georgia State University"="MGA",
"Savannah State University"="SSU",
"South Georgia State College"="SGSC",
"University of Georgia"="UGA",
"University of North Georgia"="UNG",
"University of West Georgia"="UWG",
"Valdosta State University"="VSU")) %>% 
  mutate(Inst_f = factor(Inst)) %>% 
  mutate(Sector_f = factor(Sector, levels=c("Research Universities", "Comprehensive Universities", "State Universities", "State Colleges"))) %>% 
  mutate(Details = paste0(INSTITUTION_NAME_CONSOL, "<br> Credit Hours at Graduation: ", INST_CUM_HRS_EARNED_TRANSFER,"<br> Cumulative GPA: ", USG_CUM_GPA))

write.csv(grads_2023, "data/grads_2023.csv", na="")

Do the following:

  1. Make a plot. Any kind of plot will do (though it might be easiest to work with geom_point()).

  2. Make the plot interactive with ggplotly().

  3. Make sure the hovering tooltip is more informative than the default.

Good luck and have fun!

grads_plot <- grads_2023 %>% 
  # Limit this to Bachelors degree
  filter(DEGREE_LEVEL_CODE == "B") %>%
  # Remove low count Ethnicities
  filter(!IPEDS_RACE_DESCR %in% c("American Indian or Alaska Native", "Native Hawaiian or Other Pacific Islander", "Race and Ethnicity Unknown")) %>% 
  #Sample the data by institution (46K observations is a bit much)
  group_by(Inst) %>% 
  slice_sample(n=100) %>%
  ungroup() %>%
  #build the plot
  ggplot(aes(x=INST_CUM_HRS_EARNED_TRANSFER, y=Inst, color = IPEDS_RACE_DESCR, alpha=.25)) +
  geom_point(position = position_jitter(width = 0, height = 0.45, seed = 1266)) +
  facet_grid(rows = vars(Sector_f), scales = "free", space = "free", labeller = label_wrap_gen(width=15)) + 
  guides(alpha = "none") +
  theme_minimal()+
  theme(legend.position="bottom", legend.box = "horizontal", legend.title=element_blank()) +
  labs(x="Credit Hours Earned", y="Institutions", caption = "Data: USG Data Warehouse")
grads_plot_tips <- grads_2023 %>% 
  # Limit this to Bachelors degree
  filter(DEGREE_LEVEL_CODE == "B") %>%
  # Remove low count Ethnicities
  filter(!IPEDS_RACE_DESCR %in% c("American Indian or Alaska Native", "Native Hawaiian or Other Pacific Islander", "Race and Ethnicity Unknown")) %>% 
  #Sample the data by institution (46K observations is a bit much)
  group_by(Inst) %>% 
  slice_sample(n=100) %>%
  ungroup() %>%
  #build the plot
  ggplot(aes(x=INST_CUM_HRS_EARNED_TRANSFER, y=Inst, color = IPEDS_RACE_DESCR, alpha=.25)) +
  geom_point(aes(tip = Details), position = position_jitter(width = 0, height = 0.45, seed = 1266)) +
  facet_grid(rows = vars(Sector_f), scales = "free", space = "free", labeller = label_wrap_gen(width=15)) + 
  guides(alpha = "none", tip = "none") +
  theme_minimal()+
  labs(x="Credit Hours Earned", y="Institutions", caption = "Data: USG Data Warehouse")
## Warning in geom_point(aes(tip = Details), position = position_jitter(width = 0,
## : Ignoring unknown aesthetics: tip
 ggplotly(grads_plot_tips, tooltip = c("tip")) %>% 
  layout(legend = list(orientation = "h", x = 0, y = -0.15, title = list(text="Race/Ethnicity")))
interactive_plot <- ggplotly(grads_plot_tips, tooltip = c("tip")) %>% 
  layout(legend = list(orientation = "h", x = 0, y = -0.15, title = list(text="Race/Ethnicity")))


htmlwidgets::saveWidget(interactive_plot, "output/fancy_plot.html")

Task 3:

Install the {flexdashboard} package and create a new R Markdown file in your project by going to File > New File… > R Markdown… > From Template > Flexdashboard.

Using the documentation for {flexdashboard} online, create a basic dashboard that shows a plot (static or interactive) in at least three chart areas. Play with the layout if you’re feeling brave.