-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
115 lines (72 loc) · 5.47 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
output: github_document
---
```{r setup, include=FALSE, message=FALSE, warning=FALSE, results='hide'}
library(tidyverse)
library(bbccIR)
library(lifecycle)
knitr::opts_chunk$set(warning = FALSE, message = FALSE, results = FALSE, eval = FALSE)
```
# `{bbccIR}` 0.1.5.9000
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
The `bbccIR` package is a collection of functions that will aid the department of [Institutional Research and Planning](https://www.bigbend.edu/about-us/institutional-research-and-planning/) in conducting analysis for the college.
To install the `bbccIR` package run the following code:
```{r installation}
devtools::install_github("Edgar-Zamora/bbccIR")
```
# Data Warehouse Tables
The following sections detail transformations, visualizations, and/or calculations that can be made to the tables that are found within our data warehouse (e.g. transcripts, class, student, etc.). For the functions to work you have to retrieve and store the table as a R object.
# Class Table
### `state_fte`
The `state_fte` function will calculate and disintegrate state FTE by student intent for a given year quarter. This function is accessing data from the local ods and will change daily when viewing current quarter state FTEs. As for previous years the FTEs will be static and will not change. To view a more complete picture of all state FTEs over years you can visit the Tableau dashboard found on the IR [protal page](https://port.bigbend.edu/employee/Institutional%20Research%20%20Planning/Forms/AllItems.aspx).
There are two different ways to use the `clean_dw_transcript` function. The first method is by passing the data object that contains the class table directly into the function as so:
```{r state_fte1}
state_fte(class, "C012")
```
```{r state_fte2}
class %>%
state_fte("C012")
```
### `course_success_rate`
Using the `course_success_rate` will generate an output that calculates the pass rate for every course taught at BBCC. To do so you will need to have the entire transcript table saved as an object in R.
There are two methods to use the `course_success_rate`, both equal in their output. The first method is by passing the data object that contains the transcript table directly into the function as so:
```{r course_success1}
course_success_rate(transcript_tbl) %>%
filter(year > "B89")
```
The second method is using the pipe (%>%) as so:
```{r course_success2}
transcript_tbl %>%
course_success_rate() %>%
filter(total_stu >= 5,
year == "B90")
```
There are additional parameters that can be given to the `course_success_rate` that will change the level of analysis of the output. By default, the courses success rates are reported in their raw format containing the number of withdrawals, failures, fails and total students.
# Student Table
The following set of functions are executed using the Student table found in the Data Warehouse tables provided by the WA State Board. In addition to having access to the tables you will also will have to have created a odbc connection on your machine while using the `odbc` package to make the connection in R. For a walkthrough on how to do that you can visit is this [page](https://db.rstudio.com/odbc/). After binding the database to an object in R. The following is an example of what your code should look like:
```{r odbc_con}
connection <- dbConnect(odbc::odbc(), "R Data")
student_tbl <- tbl(con, "STUDENT") %>% #in parenthesis is the name of table as given by SBCTC
collect() %>% #binds the object to the student_tbl name
clean_names() %>% #turns names into snake_case
filter(year %in% c("B78", "B89")) %>%
.....
```
This format of making connections to and storing data will apply to any other tables you would like to incorporate into R. You can also use the "Connections" tab that is part of the *Environment, History, and Connections* pane if you prefer that method.
## Dual Enrollment
This section details functions that can be used for either Running Start or College in the High School students. To be able to use any of the functions you will have had created a connection to the DW tables, specifically the Student table.
#### Running Start Students
##### `rs_fte_contribution()`
To calculate how many or what percentage of BBCC's FTEs come from running start students one can run the following function.
```{r rs_fte}
student_tbl %>%
rs_fte_contribution() %>%
filter(str_detect(yrq, "B[6-9][0-9][2-4]"))
```
## Yearly Infographic
Every year Institutional Resesrach is tasked with updating the infographic found the onthe Institutional Research and Planning [webpage](https://www.bigbend.edu/information-center/institutional-research-planning/). Running the `infographic()` function will return a `gt` table that can be exported using the `gtsave()` from `gt` package to turn the table into a pdf which is than sent the head of communication. There are two arguments that are necessary to include. The first is the academic year in the form of "[B-C]...]" and then the district population of Adams and Grant County which is retrieved from the [Census Fact Finder site](https://www.census.gov/quickfacts/fact/table/grantcountywashington,adamscountywashington,US/PST045219).
```{r infographic}
infographic("B90", "117,716")
```
# Filing Issues
If there are any issues or area of growth in this package please feel free to file a [GitHub Issue](https://github.com/Edgar-Zamora/bbccIR/issues) or contact Institutional Reserach and Planning