-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.R
266 lines (167 loc) · 8.04 KB
/
test.R
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
rfept<- read_rfept("C:/Users/dmmad/Desktop/ARIA-testes/formiga/conecta/")
sistec <- read_sistec("C:/Users/dmmad/Desktop/ARIA-testes/formiga/sistec/")
d <- compare_sistec(sistec, rfept)
write_output(d, "C:/Users/dmmad/Desktop/ARIA2/")
a <- read.csv("C:/Users/dmmad/Desktop/ARIA-testes/sistec_csv_COM_cpf.csv", sep = ";")
a %>%
select(NO_CICLO_MATRICULA, DT_DATA_INICIO, DT_DATA_FIM_PREVISTO, NO_STATUS_MATRICULA) %>%
mutate(NO_CURSO = sistec:::sistec_course_name(NO_CICLO_MATRICULA),
DT_RETENCAO_ANO = 1 + as.numeric(substr(DT_DATA_FIM_PREVISTO, 1,4)),
DT_RETENCAO_MES = as.numeric(substr(DT_DATA_FIM_PREVISTO, 6,7)),
DT_ATUAL_ANO = as.numeric(substr(Sys.Date(), 1,4)),
DT_ATUAL_MES = as.numeric(substr(Sys.Date(), 6,7))) %>%
mutate(TEMPO_EM_CURSO = 12 * (DT_ATUAL_ANO - DT_RETENCAO_ANO) + DT_ATUAL_MES - DT_RETENCAO_MES) %>%
filter(TEMPO_EM_CURSO >= 12, NO_STATUS_MATRICULA == "EM_CURSO") %>%
select(-DT_DATA_INICIO, -DT_DATA_FIM_PREVISTO, -NO_CICLO_MATRICULA) %>%
mutate(STATUS = "RETIDO")
sigaa <- read.csv("C:/Users/dmmad/Desktop/ARIA-testes/ifsulminas/sigaa/SIGAA (teste1) samuel.csv",
sep = ";")
class(sigaa) <- c("rfept_data_frame", "generic_rfept_table", class(sigaa))
names(sigaa) <- paste0("R_",names(sigaa))
sigaa$R_NU_CPF <- paste0("000.000.000-", sigaa$R_NU_CPF)
sigaa$R_CO_CICLO_MATRICULA <- ""
sigaa$R_DT_INICIO_CURSO <- as.character(sigaa$R_DT_INICIO_CURSO)
sigaa$R_CO_MATRICULA <- as.character(sigaa$R_CO_MATRICULA)
sistec <- read.csv("C:/Users/dmmad/Desktop/ARIA-testes/ifsulminas/sistec/SISTEC (teste 1) samuel.csv",
sep = ";")
sistec$NO_ALUNO <- rep("aaaaa", nrow(sistec))
sistec$NU_CPF <- floor(runif(nrow(sistec), 0, 1) * 100)
write.table(sistec, "sistec.csv", row.names = FALSE, sep = ";")
sistec <- read_sistec("C:/Users/dmmad/Desktop/ARIA-testes/ifsulminas/sistec")
names(sistec) <- paste0("S_",names(sistec))
sistec <- sistec %>%
mutate()
d <- compare_sistec(sistec, sigaa)
caminho <- paste0("C:/Users/dmmad/Desktop/ARIA-testes/ifsulminas/",
a$NO_CAMPUS %>% unique())
options(shiny.sanitize.errors = TRUE)
sistec <- read_sistec("C:/Users/dmmad/Desktop/ARIA-testes/sem_unidade_ensino/")
library(sistec)
ifsertao <- read_rfept("C:/Users/dmmad/Desktop/ARIA-testes/ifmg/conecta/")
sistec <- read_sistec("C:/Users/dmmad/Desktop/ARIA-testes/ifmg/sistec/")
d <- compare_sistec(sistec, ifsertao)
write_output(d, "C:/Users/dmmad/Desktop/ARIA2/")
library(sistec)
ifsertao <- read_rfept("C:/Users/dmmad/Desktop/ARIA-testes/ifsertao/suap/")
sistec <- read_sistec("C:/Users/dmmad/Desktop/ARIA-testes/ifsertao/sistec/")
d <- compare_sistec(sistec, ifsertao)
write_output(d, "C:/Users/dmmad/Desktop/ARIA2/")
t <- lapply(d, function(e){
if(nrow(e) == 0) {
NULL
} else {e}
})
write_output(t, "C:/Users/dmmad/Desktop/ARIA2/")
read_rfept("inst/extdata/test_datasets/generic_rfept/wrong_cota/")
library(sistec)
ifc <- read_rfept("C:/Users/dmmad/Desktop/ARIA-testes/ifc/luzerna/sigaa/")
sistec <- read_sistec("C:/Users/dmmad/Desktop/ARIA-testes/ifc/luzerna/sistec/")
d <- compare_sistec(sistec, ifc)
write_output(d, "C:/Users/dmmad/Desktop/ARIA2/")
a <- read_rfept("C:/Users/dmmad/Desktop/ARIA-testes/ifmg/conecta/")
a1 <- a %>%
filter(R_NO_CAMPUS == "Congonhas",
R_DT_INICIO_CURSO %in% c("2019.1", "2019.2", "2020.1", "2020.2"))
a2 <- a1 %>%
arrange(R_NO_CURSO, R_DT_INICIO_CURSO)
b <- read_sistec("C:/Users/dmmad/Desktop/ARIA-testes/ifmg/sistec/")
b1 <- b %>%
filter(S_DT_INICIO_CURSO %in% c("2019.1", "2019.2", "2020.1", "2020.2"))
b2 <- b1 %>%
arrange(S_NO_CURSO, S_DT_INICIO_CURSO)
a2$R_NO_ALUNO <- b2$S_NO_ALUNO[1:751]
a2$R_NU_CPF <- b2$S_NU_CPF[1:751]
d <- compare_sistec(b2, a2)
write_output(d, "C:/Users/dmmad/Desktop/ARIA_IFMG")
names(a2)
##################
#### retenção ####
##################
a <- read.csv("C:/Users/dmmad/Desktop/ARIA-testes/sistec_csv_COM_cpf.csv", sep = ";")
a %>%
select(NO_CICLO_MATRICULA, DT_DATA_INICIO, DT_DATA_FIM_PREVISTO, NO_STATUS_MATRICULA) %>%
mutate(NO_CURSO = sistec:::sistec_course_name(NO_CICLO_MATRICULA),
DT_RETENCAO_ANO = 1 + as.numeric(substr(DT_DATA_FIM_PREVISTO, 1,4)),
DT_RETENCAO_MES = as.numeric(substr(DT_DATA_FIM_PREVISTO, 6,7)),
DT_ATUAL_ANO = as.numeric(substr(Sys.Date(), 1,4)),
DT_ATUAL_MES = as.numeric(substr(Sys.Date(), 6,7))) %>%
mutate(TEMPO_EM_CURSO = 12 * (DT_ATUAL_ANO - DT_RETENCAO_ANO) + DT_ATUAL_MES - DT_RETENCAO_MES) %>%
filter(TEMPO_EM_CURSO >= 12, NO_STATUS_MATRICULA == "EM_CURSO") %>%
select(-DT_DATA_INICIO, -DT_DATA_FIM_PREVISTO, -NO_CICLO_MATRICULA) %>%
mutate(STATUS = "RETIDO")
#(ano_atual - ano_base) * 12 + mes_atual - mes_base
#####################################################################
sigaa <- read_rfept("sigaa")
sistec <- read_sistec("sistec")
d <- compare_sistec(sistec, sigaa)
write_output(d, "ARIA")
sigaa <- read_rfept("sigaa_ifsc")
sistec <- read_sistec("sistec_ifsc")
d <- compare_sistec(sistec, sigaa)
write_output(d, "ARIA")
sigaa <- read_rfept("sigaa_ifsc2")
sistec <- read_sistec("sistec_ifsc2")
d <- compare_sistec(sistec, sigaa)
write_output(d, "ARIA")
sigaa <- read_rfept("sigaa_ifsc3")
sistec <- read_sistec("sistec_ifsc")
d <- compare_sistec(sistec, sigaa)
write_output(d, "ARIA")
join %>%
group(Função, subfunção, acao, programa, ano) %>%
summariza(Pago - `Pago inicial`)
ifpe <- read_rfept("inst/extdata/test_datasets/generic_rfept/rfept/")
ifpe <- read_rfept("inst/extdata/test_datasets/qacademico/") %>%
filter(R_NO_CURSO == "ENGENHARIA MECÂNICA", R_DT_INICIO_CURSO == "2019.1")
sistec <- read_sistec("inst/extdata/test_datasets/sistec/") %>%
filter(S_NO_CURSO == "ENGENHARIA MECÂNICA", S_NO_CAMPUS == "RECIFE")
d <- compare_sistec(sistec, ifpe)
ifpe$R_CO_MATRICULA <- floor(runif(45, 0.1, 0.99) * 1000000)
ifpe %>%
select(-R_CO_CICLO_MATRICULA) %>%
write.table("ifpe.csv", sep = ",", row.names = FALSE, fileEncoding = "latin1")
ifpe2 <- read_rfept("oioi")
sistec2 <- read_sistec("oioi2")
d <- compare_sistec(sistec2, ifpe2)
write.table(sistec, "sistec.csv", sep = ",", row.names = FALSE, fileEncoding = "latin1")
library(sistec)
sigaa <- read_rfept("C:/Pesquisa/app_test/academico/")
sistec <- read_sistec("C:/Pesquisa/app_test/sistec/")
d <- compare_sistec(sistec, sigaa)
write_output(d, "C:/Pesquisa/app_test/")
a <- read_sistec("C:/Users/dmmad/Desktop/teste_legal/sistec/")
b <- read_sigaa("C:/Users/dmmad/Desktop/teste_legal/sigaa")
d <- compare_sistec(a,b)
write_output(d, "C:/Users/dmmad/Desktop/Nova pasta/")
read_sistec("C:/Pesquisa/sistec2/inst/extdata/test_datasets/sistec/")
read_sistec("C:/Pesquisa/dados/sistec/web/")
read_sistec("C:/Pesquisa/dados/sistec")
read_sistec("C:/Pesquisa/dados/ifsc/sistec/")
read_sistec("C:/Users/dmmad/Desktop/sigaa/sistec")
a <- read_sistec("C:/Users/dmmad/Desktop/aria_testes/viviane/sistec/")
b <- read_sigaa("C:/Users/dmmad/Desktop/aria_testes/viviane/sigaa")
d <- compare_sistec(a,b)
a <- read_sistec("C:/Users/dmmad/Desktop/exemplos/sistec/")
b <- read_qacademico("C:/Users/dmmad/Desktop/exemplos/qacademico/")
d <- compare_sistec(a,b)
write_output(d, "C:/Users/dmmad/Desktop/Nova pasta/")
a <- read_sistec("C:/Users/dmmad/Desktop/teste_sc/sistec")
b <- read_sigaa("C:/Users/dmmad/Desktop/teste_sc/sigaa")
d <- compare_sistec(a,b)
write_output(d, "C:/Users/dmmad/Desktop/Tenso_demais")
a <- read_sistec("C:/Users/dmmad/Desktop/oi/sistec")
b <- read_sigaa("C:/Users/dmmad/Desktop/oi/sigaa")
d <- compare_sistec(a,b)
write_output(d, "C:/Users/dmmad/Desktop/Tenso_demais2")
a <- read_sistec("C:/Users/dmmad/Desktop/oi/sistec")
b <- read_sigaa("C:/Users/dmmad/Desktop/oi/sigaa")
d <- compare_sistec(a,b)
write_output(d, "C:/Users/dmmad/Desktop/Tenso_demais2")
a <- read_sistec("inst/extdata/examples/sistec/")
b <- read_qacademico("inst/extdata/examples/qacademico/")
d <- compare_sistec(a,b)
a <- read_sistec("inst/extdata/test_datasets/sistec/")
b <- read_qacademico("inst/extdata/test_datasets/qacademico/")
d <- compare_sistec(a,b)
aria_desktop_build("C:/Users/dmmad/Desktop/ARIA_desktop",
"C:/Users/dmmad/Desktop")