Skip to content

Commit

Permalink
Include script to generate final table for system notes
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandomayer committed Jul 20, 2016
1 parent ac696fe commit 0d9fb0b
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 02_Analise_Exploratoria_de_Dados.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
Expand Down Expand Up @@ -1308,6 +1309,7 @@ <h1>Exercícios</h1>
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
Expand Down
2 changes: 2 additions & 0 deletions aulas.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
Expand Down Expand Up @@ -348,6 +349,7 @@ <h2>Scripts R</h2>
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
Expand Down Expand Up @@ -339,6 +340,7 @@ <h1>Programa/objetivos da disciplina</h1>
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
Expand Down
45 changes: 45 additions & 0 deletions notas.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,48 @@ barplot(prop.table(table(notas.fim$SF))*100,
main = "Após o exame")
par(mfrow = c(1, 1))
```

```{r, echo=FALSE, include=FALSE}
##----------------------------------------------------------------------
## Monta a tabela final com as informacoes necessarias para digitar as
## notas no sistema
## Importa nomes
nomes <- read.csv("~/Dropbox/UFPR/disciplinas/CE-001-N/nomes_ce001n-2016-01.csv")
nomes$Matricula <- as.numeric(gsub("GRR", "", nomes$Matricula))
## Faz o merge dos nomes com as notas
notas.sis <- merge(nomes, notas.fim[, c("Matricula", "MFA")],
by = "Matricula", sort = FALSE)
## Faz o merge da coluna Freq2 de notas (que e o numero de presencas)
notas.sis <- merge(notas.sis, notas[, c("Matricula", "Freq2")],
by = "Matricula", sort = FALSE)
## De acordo com o sistema, as faltas sao contadas em HORAS da carga
## horaria semestral que é de 60 horas. Portanto, como são permitidos
## 25% de faltas, isso corresponde a 15 horas das 60
faltas.max <- 15 # max de faltas (de acordo com o sistema)
## Considerando que cada aula tem 2 horas-aula, entao seriam 30 aulas no
## semestre. Como a minha frequencia esta em numero de aulas (e nao em
## horas), vou converter para horas. Antes é necessário expandir as
## presenças para 30 aulas
notas.sis$Freq3 <- notas.sis$Freq2 + (30 - aulas.eff)
## E agora calcula o numero de horas-aula de presença
notas.sis$Freq4 <- notas.sis$Freq3 * 2
## Finalmente calcula o numero de faltas em horas-aula
notas.sis$Faltas <- 60 - notas.sis$Freq4
## Cria uma coluna com a situação
notas.sis$S <- "Ap"
notas.sis$S[notas.sis$MFA < 50] <- "Re"
## Mantem apenas as coluna de interesse
col.sis <- c("Matricula", "Curso", "Nome", "Faltas", "MFA", "S")
## Exporta tabela final
write.table(notas.sis[, col.sis],
"~/Dropbox/UFPR/disciplinas/CE-001-N/final_ce001n-2016-01.csv",
sep = ",", dec = ".", col.names = TRUE, row.names = FALSE)
```
2 changes: 2 additions & 0 deletions notas.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
Expand Down Expand Up @@ -1684,6 +1685,7 @@ <h2>Resultados finais</h2>
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
Expand Down
2 changes: 2 additions & 0 deletions recursos.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
Expand Down Expand Up @@ -319,6 +320,7 @@ <h2>Outros recursos</h2>
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
Expand Down
2 changes: 2 additions & 0 deletions referencias.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
Expand Down Expand Up @@ -327,6 +328,7 @@ <h2>Leituras complementares</h2>
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
Expand Down

0 comments on commit 0d9fb0b

Please sign in to comment.