R/tidytranscript.R

Defines functions tidytranscript

Documented in tidytranscript

#' Scrape all desired data from a student's transcript
#'
#' @param file A path to a file (either a single string or a raw vector)
#'
#' @return A tibble with all of the data that we care about
#' @export
#'
#' @examples
#' \dontrun{
#' tidytranscript('data_raw/my_transcript.pdf')
#' }
tidytranscript <- function(file) {

    dat <- tidytranscript::read_transcript(file)

    tests <- tidytranscript::prepare_tests(dat)

    dplyr::mutate(
        tidytranscript::scrape_grades(dat),
        birthday = tidytranscript::scrape_birthday(dat, FALSE),
        major = tidytranscript::scrape_major(dat, FALSE),
        test_composite = tests$test_composite,
        test_english = tests$test_english,
        test_math = tests$test_math,
        test_science = tests$test_science
        )
}
averyrobbins1/tidytranscript documentation built on March 24, 2021, 1:16 a.m.