-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCourseOverlap.jl
50 lines (44 loc) · 1.06 KB
/
CourseOverlap.jl
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
module CourseOverlap
include("Parse.jl")
include("Utils.jl")
import .Parse: get_plans
import .Utils: writerow
plans = get_plans()
open("./files/course_overlap.csv", "w") do file
writerow(file, [
"Year",
"Base major",
"Other major",
"Percent of base major's courses in other major",
])
for year in 2015:2050
if year ∉ keys(plans)
break
end
curricula = Dict(
major => Set([
course
for term in degree_plans[first(
college
for college in ["TH", "WA", "SN", "MU", "FI", "RE", "SI", "EI"]
if college ∈ keys(degree_plans) && !(college == "SN" && year < 2020)
)]
for course in term
if course.for_major
])
for (major, degree_plans) in plans[year]
)
majors = sort(collect(keys(curricula)))
for base in majors
for other in majors
writerow(file, [
string(year),
base,
other,
string(length(curricula[base] ∩ curricula[other]) / length(curricula[base]))
])
end
end
end
end
end