Code
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Code
requireNamespace("plotly")
Loading required namespace: plotly
Code
requireNamespace("DT")
Loading required namespace: DT
Code
ipeds.df <- readRDS("./data/ipeds_completions_2000_2023.RData")
Code
ipeds.df %>%
  filter(field_cip %in%  c("25.0101","25.9999")) %>% # library sceince
  filter(award_level %in% c(7)) %>%  # masters level
  group_by(year)  %>%
  summarise(tot_male = sum(tot_awards_male, na.rm= TRUE),
           tot_female= sum(tot_awards_female, na.rm=TRUE),
           tot_female_white = sum(tot_awards_female_white, na.rm=TRUE),
           tot_male_white = sum(tot_awards_male_white, na.rm=TRUE),
           tot_female_black = sum(tot_awards_female_black, na.rm=TRUE),
           tot_male_black = sum(tot_awards_male_black, na.rm=TRUE),
           tot_grand = tot_male+tot_female,
           p_female = tot_female/tot_grand,
           p_male = 1-p_female,
           p_black = (tot_male_black+tot_female_black)/tot_grand,
           p_white = (tot_male_white+tot_female_white)/tot_grand,
           p_otherrace = 1-p_black-p_white
           ) -> ipeds_lib_tot_year.df

Percentage of MLIS Degrees Awarded to Black Students Over time

Code
{ipeds_lib_tot_year.df %>%
           ggplot(aes(x=year,y=p_black)) + 
           geom_line() 
  } %>% plotly::ggplotly()
Code
{ipeds_lib_tot_year.df %>%
           ggplot(aes(x=year,y=p_otherrace)) + 
           geom_line()} %>% plotly::ggplotly()

Total MLIS Degrees Awarded by Year, Gender & Race (3 categories)

Code
ipeds_lib_tot_year.df %>% 
  DT::datatable(extensions = 'Buttons',
      options = list(dom = 'Bfrltip',
                     buttons = c('csv')),)