-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.jl
77 lines (57 loc) · 1.64 KB
/
main.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
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
#just run this script to execute most of the functions
include("demo.jl")
include("countryBiasESC.jl")
include("biasAnalysis.jl")
include("biasGraphView.jl")
#eg. main(1980,1990,5,0.05)
function main(startYr = 1980, endYr = 1990, windowSize = 5, alpha = 0.05)
try
mkdir("./plots")
catch
println("dirs exist")
end
try
mkdir("./graphs/")
catch
println("dirs exist")
end
try
mkdir("./biasAssociationPlots")
catch
println("dirs exist")
end
#produces the plots for collusion 1 and 2 way
demo(startYr,endYr,windowSize)
#calls csvDir2AdjList.jl and returns 2 element array with the upper and lower which are the high score pairings and lower score pairings (collusion vs neglect)
biasESC_uppper_lower = biasesESC(startYr,endYr,windowSize,alpha)
#generate the plots for the overall associations and trends
analyzeBiases(biasESC_uppper_lower[1],biasESC_uppper_lower[2])
#produce the graphs of both analysis
graphAvoid(biasESC_uppper_lower[1],biasESC_uppper_lower[2])
############################
try
mkdir("./results")
catch
println("dirs exist")
end
try
mkdir("./results/graphs")
catch
println("dirs exist")
end
try
mkdir("./results/plots")
catch
println("dirs exist")
end
try
cp("./plots/","./results/plots",force=true)
catch
println("can't mv to results")
end
try
cp("./graphs","./results/graphs",force=true)
catch
println("can't mv to results")
end
end