diff --git a/DESCRIPTION b/DESCRIPTION index 8186a205..95ca8c79 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: IPEDSuploadables Title: Transforms Institutional Data into Text Files for IPEDS Automated Import/Upload -Version: 3.0.0 +Version: 3.0.1 Authors@R: c( person(given = "Alison", family = "Lanski", role = c("aut", "cre"), email = "alanski@nd.edu"), person("Shiloh", "Fling", role = c("aut"),email = "shiloh.fling@unlv.edu"), diff --git a/NEWS.md b/NEWS.md index 02d2dbf7..50d8989c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# IPEDSuploadables 3.0.1 +* Adjusting final file column names for HR wording update (no user changes necessary) +* Adding data check to OM for duplicate student IDs + # IPEDSuploadables 3.0.0 * Adding Admissions survey parts for demographic and test score breakouts diff --git a/R/make_hr_part_A1.R b/R/make_hr_part_A1.R index 0ad462e3..5576194c 100644 --- a/R/make_hr_part_A1.R +++ b/R/make_hr_part_A1.R @@ -59,7 +59,7 @@ make_hr_part_A1 <- function(df) { PART = "A1", TENURE = .data$TENURE, RANK = .data$RANK, - RACEETHNICITYGENDER = .data$REG, + RACEETHNICITYSEX = .data$REG, COUNT = .data$COUNT ) diff --git a/R/make_hr_part_B1.R b/R/make_hr_part_B1.R index 18568920..f9ef8d72 100644 --- a/R/make_hr_part_B1.R +++ b/R/make_hr_part_B1.R @@ -47,7 +47,7 @@ make_hr_part_B1 <- function(df) { SURVSECT = "HR1", PART = "B1", OCCCATEGORY1 = .data$OCCCATEGORY1, - RACEETHNICITYGENDER = .data$REG, + RACEETHNICITYSEX = .data$REG, COUNT = .data$COUNT ) } diff --git a/R/make_hr_part_D1.R b/R/make_hr_part_D1.R index 40860058..2971ca0d 100644 --- a/R/make_hr_part_D1.R +++ b/R/make_hr_part_D1.R @@ -47,7 +47,7 @@ make_hr_part_D1 <- function(df) { SURVSECT = "HR1", PART = "D1", OCCCATEGORY1 = .data$OCCCATEGORY1, - RACEETHNICITYGENDER = .data$REG, + RACEETHNICITYSEX = .data$REG, COUNT = .data$COUNT ) diff --git a/R/make_hr_part_D2.R b/R/make_hr_part_D2.R index 99112b06..280b7c3b 100644 --- a/R/make_hr_part_D2.R +++ b/R/make_hr_part_D2.R @@ -46,7 +46,7 @@ make_hr_part_D2 <- function(df) { SURVSECT = "HR1", PART = "D2", OCCCATEGORY4 = .data$OCCCATEGORY4, - RACEETHNICITYGENDER = .data$REG, + RACEETHNICITYSEX = .data$REG, COUNT = .data$COUNT ) diff --git a/R/make_hr_part_G1.R b/R/make_hr_part_G1.R index fc238489..9b8a60e5 100644 --- a/R/make_hr_part_G1.R +++ b/R/make_hr_part_G1.R @@ -83,7 +83,7 @@ make_hr_part_G1 <- function(df) { SURVSECT = "HR1", PART = "G1", RANK = .data$RANK, - GENDER = .data$GENDER, + SEX = .data$GENDER, `12MCOUNT` = .data$`12mCOUNT`, `11MCOUNT` = .data$`11mCOUNT`, `10MCOUNT` = .data$`10mCOUNT`, diff --git a/R/make_hr_part_H1.R b/R/make_hr_part_H1.R index 1d4590d8..1a4850f4 100644 --- a/R/make_hr_part_H1.R +++ b/R/make_hr_part_H1.R @@ -48,7 +48,7 @@ make_hr_part_H1 <- function(df) { SURVSECT = "HR1", PART = "H1", TENURE = .data$TENURE, - RACEETHNICITYGENDER = .data$REG, + RACEETHNICITYSEX = .data$REG, COUNT = .data$COUNT ) } diff --git a/R/make_hr_part_H2.R b/R/make_hr_part_H2.R index 13011598..ff517b24 100644 --- a/R/make_hr_part_H2.R +++ b/R/make_hr_part_H2.R @@ -47,7 +47,7 @@ make_hr_part_H2 <- function(df) { SURVSECT = "HR1", PART = "H2", OCCCATEGORY5 = .data$OCCCATEGORY5, - RACEETHNICITYGENDER = .data$REG, + RACEETHNICITYSEX = .data$REG, COUNT = .data$COUNT ) } diff --git a/R/prep_om_data_frame.R b/R/prep_om_data_frame.R index d4baaa9b..6638f17d 100644 --- a/R/prep_om_data_frame.R +++ b/R/prep_om_data_frame.R @@ -13,7 +13,6 @@ prep_om_data_frame <- function(df) { colnames(df) <- stringr::str_to_upper(colnames(df)) - if("EXCLUSION" %in% colnames(df) & sum(grepl(x = df$EXCLUSION, "clude")) > 1){ df <- df %>% dplyr::rename(COHORTSTATUS = .data$EXCLUSION) @@ -34,5 +33,10 @@ prep_om_data_frame <- function(df) { warning("Please use the CohortStatus column with values of 'Include' or 'Exclude' to indicate exclusions.") } + mult_rows <- df %>% dplyr::count(.data$STUDENTID) %>% dplyr::filter(n > 1) + if (nrow(mult_rows) > 0) { + warning(paste0("IPEDS requests highest degree only for each student in each award year. These StudentIds may have multiple degree levels: ", toString(unique(mult_rows$STUDENTID)))) + } + return(df) } diff --git a/data/part_outputs.rda b/data/part_outputs.rda index 13f338ea..5e764497 100644 Binary files a/data/part_outputs.rda and b/data/part_outputs.rda differ diff --git a/docs/404.html b/docs/404.html index 1df7d03c..099af8a6 100644 --- a/docs/404.html +++ b/docs/404.html @@ -8,8 +8,8 @@ Page not found (404) • IPEDSuploadables - - + + @@ -22,7 +22,7 @@ IPEDSuploadables - 3.0.0 + 3.0.1 "; + if (ClipboardJS.isSupported()) { + $(document).ready(function () { + var copyButton = ""; - $("div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); + // Initialize tooltips: + $('.btn-copy-ex').tooltip({ container: 'body' }); - // Initialize clipboard: - var clipboard = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); - } - }); + // Initialize clipboard: + var clipboard = new ClipboardJS('[data-clipboard-copy]', { + text: function (trigger) { + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); + } + }); - clipboard.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); + clipboard.on('success', function (e) { + changeTooltipMessage(e.trigger, 'Copied!'); + e.clearSelection(); + }); - clipboard.on('error', function(e) { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); + clipboard.on('error', function (e) { + changeTooltipMessage(e.trigger, 'Press Ctrl+C or Command+C to copy'); + }); - }); - } + }); + } /* Search marking --------------------------*/ var url = new URL(window.location.href); @@ -80,75 +80,83 @@ }); } - /* Search --------------------------*/ - /* Adapted from https://github.com/rstudio/bookdown/blob/2d692ba4b61f1e466c92e78fd712b0ab08c11d31/inst/resources/bs4_book/bs4_book.js#L25 */ + /* Search --------------------------*/ + /* Adapted from https://github.com/rstudio/bookdown/blob/2d692ba4b61f1e466c92e78fd712b0ab08c11d31/inst/resources/bs4_book/bs4_book.js#L25 */ // Initialise search index on focus - var fuse; - $("#search-input").focus(async function(e) { - if (fuse) { - return; - } - - $(e.target).addClass("loading"); - var response = await fetch($("#search-input").data("search-index")); - var data = await response.json(); + var fuse; + $("#search-input").focus(async function (e) { + if (fuse) { + return; + } + + $(e.target).addClass("loading"); + var response = await fetch($("#search-input").data("search-index")); + var data = await response.json(); + + var options = { + keys: ["what", "text", "code"], + ignoreLocation: true, + threshold: 0.1, + includeMatches: true, + includeScore: true, + }; + fuse = new Fuse(data, options); + + $(e.target).removeClass("loading"); + }); + // Use algolia autocomplete var options = { - keys: ["what", "text", "code"], - ignoreLocation: true, - threshold: 0.1, - includeMatches: true, - includeScore: true, + autoselect: true, + debug: true, + hint: false, + minLength: 2, }; - fuse = new Fuse(data, options); - - $(e.target).removeClass("loading"); - }); - - // Use algolia autocomplete - var options = { - autoselect: true, - debug: true, - hint: false, - minLength: 2, - }; - var q; -async function searchFuse(query, callback) { - await fuse; - - var items; - if (!fuse) { - items = []; - } else { - q = query; - var results = fuse.search(query, { limit: 20 }); - items = results - .filter((x) => x.score <= 0.75) - .map((x) => x.item); - if (items.length === 0) { - items = [{dir:"Sorry 😿",previous_headings:"",title:"No results found.",what:"No results found.",path:window.location.href}]; + var q; + async function searchFuse(query, callback) { + await fuse; + + var items; + if (!fuse) { + items = []; + } else { + q = query; + var results = fuse.search(query, { limit: 20 }); + items = results + .filter((x) => x.score <= 0.75) + .map((x) => x.item); + if (items.length === 0) { + items = [{ dir: "Sorry 😿", previous_headings: "", title: "No results found.", what: "No results found.", path: window.location.href }]; + } + } + callback(items); } - } - callback(items); -} - $("#search-input").autocomplete(options, [ - { - name: "content", - source: searchFuse, - templates: { - suggestion: (s) => { - if (s.title == s.what) { - return `${s.dir} >
${s.title}
`; - } else if (s.previous_headings == "") { - return `${s.dir} >
${s.title}
> ${s.what}`; - } else { - return `${s.dir} >
${s.title}
> ${s.previous_headings} > ${s.what}`; - } + $("#search-input").autocomplete(options, [ + { + name: "content", + source: searchFuse, + templates: { + suggestion: (s) => { + if (s.title == s.what) { + return `${s.dir} >
${s.title}
`; + } else if (s.previous_headings == "") { + return `${s.dir} >
${s.title}
> ${s.what}`; + } else { + return `${s.dir} >
${s.title}
> ${s.previous_headings} > ${s.what}`; + } + }, }, }, - }, - ]).on('autocomplete:selected', function(event, s) { - window.location.href = s.path + "?q=" + q + "#" + s.id; - }); + ]).on('autocomplete:selected', function (event, s) { + window.location.href = s.path + "?q=" + q + "#" + s.id; + }); }); })(window.jQuery || window.$) + +document.addEventListener('keydown', function (event) { + // Check if the pressed key is '/' + if (event.key === '/') { + event.preventDefault(); // Prevent any default action associated with the '/' key + document.getElementById('search-input').focus(); // Set focus to the search input + } +}); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 7bfc1b8f..62ef7cda 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,5 +1,5 @@ -pandoc: '3.4' -pkgdown: 2.1.0 +pandoc: 3.6.3 +pkgdown: 2.2.0 pkgdown_sha: ~ articles: howto_overall_ipedsuploadables: howto_overall_ipedsuploadables.html @@ -12,7 +12,7 @@ articles: setup_for_gr200: setup_for_gr200.html setup_for_hr: setup_for_hr.html setup_for_om: setup_for_om.html -last_built: 2025-12-05T14:59Z +last_built: 2026-02-02T16:31Z urls: reference: https://alisonlanski.github.io/IPEDSuploadables/reference article: https://alisonlanski.github.io/IPEDSuploadables/articles diff --git a/docs/reference/IPEDSuploadables-package.html b/docs/reference/IPEDSuploadables-package.html index c925b784..b6ee457a 100644 --- a/docs/reference/IPEDSuploadables-package.html +++ b/docs/reference/IPEDSuploadables-package.html @@ -1,5 +1,5 @@ -IPEDSuploadables: Transforms Institutional Data into Text Files for IPEDS Automated Import/Upload — IPEDSuploadables-package • IPEDSuploadables Skip to contents @@ -8,7 +8,7 @@ IPEDSuploadables - 3.0.0 + 3.0.1