-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.R.example
142 lines (138 loc) · 4.13 KB
/
config.R.example
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
path_data = ""
file_background_data = "cleaned_student_background_data(20220512).csv"
file_term_data = "cleaned_student_term_data(20220512).csv"
file_course_data = "cleaned_student_term_course_section(20220512).csv"
term_part_codes = data.frame(code=c("03","14","25","51","92"),
desc=c("Winter","Spring","Summer","Summer","Fall"),
start_month=c(1, 4, 7, 7, 9),
end_month=c(3, 6, 8, 8, 12))
summer_part_codes = term_part_codes$code[term_part_codes$desc=="Summer"]
act_uc = data.frame(act=c(14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36),
uc_pre_12=c(27,30,33,37,40,43,47,50,53,57,60,63,67,70,73,77,80,83,87,90,93,97,100),
uc_post_12=c(56,58,60,62,63,65,67,69,71,73,75,77,79,81,83,85,87,89,92,94,97,100,100))
get_uc_from_act = function(act, pre_12=F) {
if (pre_12) return(act_uc[match(act,act_uc$act),"uc_pre_12"])
return(act_uc[match(act,act_uc$act),"uc_post_12"])
}
get_uc_from_sat = function(sat, cohort) {
UC = sat
UC[is.na(cohort)] = NA
pre_12 = !is.na(cohort) & cohort < 2012
post_12 = !is.na(cohort) & cohort >= 2012
UC[pre_12] = round((sat[pre_12]-200)/6)
UC[post_12] = round((sat[post_12]+200)/10)
return(UC)
}
dept_schools <- c(
'AFAM' = 'Humanities',
'ANTHRO' = 'Soc Sci',
'ARTHIS' = 'Humanities',
'ARTS' = 'Arts',
'ARTSTU' = '',
'ASIANAM' = 'Humanities',
'BIOSCI' = 'Bio Sci',
'BME' = 'Engr', # Biomedical Engineering
'CAMPREC' = '', # Campus Recreation
'CBEMS' = 'Engr',
'CHC/LAT' = 'Soc Sci',
'CHEM' = 'PhySci',
'CHINESE' = 'Humanities',
'CLASSIC' = 'Humanities',
'COMLIT' = 'Humanities',
'COMPSCI' = 'ICS',
'CRM/LAW' = 'Soc Ecol',
'CSE' = 'ICS',
'DANCE' = 'Arts',
'DRAMA' = 'Arts',
'EARTHSS' = 'PhySci',
'EASIAN' = 'Humanities',
'ECON' = 'Soc Sci',
'EDUC' = 'Educ',
'EECS' = 'Engr',
'ENGLISH' = 'Humanities',
'ENGR' = 'Engr',
'ENGRCEE' = 'Engr',
'ENGRMAE' = 'Engr',
'ENVIRON' = '', # closed in 2013
'FLM&MDA' = 'Humanities',
'FRENCH' = 'Humanities',
'GERMAN' = 'Humanities',
'GREEK' = 'Humanities',
'HEBREW' = 'Humanities',
'HISTORY' = 'Humanities',
'HUMAN' = 'Humanities',
'I&CSCI' = 'ICS',
'IN4MATX' = 'ICS',
'INTLST' = 'Soc Sci',
'ITALIAN' = 'Humanities',
'JAPANSE' = 'Humanities',
'KOREAN' = 'Humanities',
'LATIN' = 'Humanities',
'LINGUIS' = 'Soc Sci',
'LPS' = 'Soc Sci',
'MATH' = 'PhySci',
'MGMT' = 'Business',
'MUSIC' = 'Arts',
'PERSIAN' = 'Humanities',
'PHILOS' = 'Humanities',
'PHYSCI' = 'PhySci',
'PHYSICS' = 'PhySci',
'POLSCI' = 'Soc Sci',
'PP&D' = 'Soc Ecol',
'PSYBEH' = 'Soc Ecol',
'PSYCH' = 'Soc Ecol',
'PUBHLTH' = 'PubHlth',
'RELSTD' = 'Humanities',
'RUSSIAN' = 'Humanities',
'SOCECOL' = 'Soc Ecol',
'SOCIOL' = 'Soc Sci',
'SOCSCI' = 'Soc Sci',
'SPANISH' = 'Humanities',
'STATS' = 'ICS',
'UNIAFF' = '', # University Affairs
'UNISTU' = '', # University Studies
'VIETMSE' = 'Humanities',
'WOMNST' = 'Humanities',
'WRITING' = '', # Writing Center
'ARABIC' = 'Humanities',
'EUROST' = 'Humanities',
'HUMARTS' = 'Humanities',
'LITJRN' = 'Humanities',
'PORTUG' = 'Humanities',
'ARTSHUM' = 'Arts',
'EPIDEM' = 'Medicine', # School of Medicine
'PHRMSCI' = 'Pharmacy',
'EDUABR' = 'Educ',
'HINDI' = 'Humanities',
'GLBLCLT' = 'Humanities',
'NURSCI' = 'Nursing',
'MGMTMBA' = 'Business',
'ROTC' = '', # Reserve Officers' Training Corps
'UCDC' = '', # Washington Center
'ANATOMY' = 'Medicine', # School of Medicine
'MGMTPHD' = 'Business',
'ACENG' = '', # Academic English
'ART' = 'Arts',
'EXCHANG' = '', # Exchange
'GEN&SEX' = 'Humanities',
'CRITISM' = 'Humanities',
'TEST' = '', # ???
'SPPS' = 'Pharmacy',
'VISSTD' = 'Humanities',
'GLBLME' = 'Humanities',
'MEDHUM' = 'Humanities',
'COGS' = 'Soc Sci',
'ARMN' = 'Humanities',
'UPPP' = 'Soc Ecol',
'CBE' = 'Engr',
'EAS' = 'Humanities',
'ENGRMSE' = 'Engr',
'LSCI' = 'Soc Sci',
'PSCI' = 'Soc Ecol',
'CLT&THY' = 'Humanities',
'MSE' = 'Engr',
'PATH' = 'Bio Sci',
'RADIO' = 'Medicine', # Medicine
'GDIM' = 'ICS',
'FAMMED' = 'Medicine' # (Family) Medicine
)