This repository was archived by the owner on Mar 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPM 1.Rmd
177 lines (113 loc) · 9.31 KB
/
PM 1.Rmd
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
---
title: 'PM 1'
author: 'Felipe Domínguez'
output:
html_document: default
pdf_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r global_options, include=FALSE}
knitr::opts_chunk$set(
fig.path = "Figs/",
echo = FALSE, warning = FALSE, message = FALSE, fig.align = "center", fig.show = 'hold', fig.width = 12, fig.height = 9
)
```
##### Semana 16/08 - 30/08
___
Objetivos de la semana:
* Graficar:
+ Cantidad de alumnos que toman los distintos exploratorios
+ Cantidad de exploratorios que toman los alumnos.
* Profundizar en la hipotesis H3: Depende de trayectorias educacionales (TE) que muestran desorientación.
+ H3.1: depende de TE que incluyen varios cursos exploratorios
+ H3.2: depende de TE que incluyen cursos de varios majors/minors
___
\newline
```{r echo=T, include=FALSE, results='hide'}
library(modeest)
library(RColorBrewer)
library(e1071)
library(MASS)
library(survival)
library(dplyr)
library(ggplot2)
library(ggthemes)
library(forcats)
library(ggthemr)
library(rlist)
require("ggplot2")
require("gridExtra")
ggthemr("dust")
theme_update(plot.title = element_text(hjust = 0.5))
```
##### Importamos los datos y imprimimos el header
Fueron importatos los datos de cada año por separado, y además se juntó la información de las 4 generaciones.
```{r import data, echo=FALSE}
path <- "/Users/FDOM/Google Drive/U/4to año/8vo semestre/Process Minning iPre/iPre-Process-Minning"
setwd(path)
data2013 <- read.csv("Data/Csv/admision.2013_an.csv", head = T, strip.white = T, stringsAsFactors = T, encoding = "latin1", fill = T)
data2014 <- read.csv("Data/Csv/admision.2014_an.csv", head = T, strip.white = T, stringsAsFactors = T, encoding = "latin1", fill = T)
data2015 <- read.csv("Data/Csv/admision.2015_an.csv", head = T, strip.white = T, stringsAsFactors = T, encoding = "latin1", fill = T)
data2016 <- read.csv("Data/Csv/admision.2016_an.csv", head = T, strip.white = T, stringsAsFactors = T, encoding = "latin1", fill = T)
data <- rbind(data2013, data2014, data2015, data2016)
names(data2013)
```
Para este primer análisis, es necesario listar los distintos exploratorios que ofrecen los majors. Los datos fueron sacados de la página del Siding.
```{r exp_courses}
exp_courses <- list("ICH1005", "ICH2304", "ICH1005", "IIC1005", "ICC2304", "IEE1100", "ICE2005", "ICE2623", "ICH1104", "ICH1005", "ICS1113", "ICM1001", "ICM2313", "IMM1003", "IIQ1001", "ICT2904", "ING1024", "IMM2003", "IQQ2663", "IBM1005", "ING1015", "IMT1001", "IRB1001", "IRB2001", "AQH0000")
```
\newline
#### Cantidad de alumnos que toman los distintos exploratorios
```{r plot}
exp_data2013 <- subset(data2013, SIGLA %in% exp_courses, VIA_INGRESO = "ORDINARIA PAA")
exp_data2013$SIGLA <- fct_infreq(exp_data2013$SIGLA)
exp_data2014 <- subset(data2014, SIGLA %in% exp_courses, VIA_INGRESO = "ORDINARIA PAA")
exp_data2014$SIGLA <- fct_infreq(exp_data2014$SIGLA)
exp_data2015 <- subset(data2015, SIGLA %in% exp_courses, VIA_INGRESO = "ORDINARIA PAA")
exp_data2015$SIGLA <- fct_infreq(exp_data2015$SIGLA)
exp_data2016 <- subset(data2016, SIGLA %in% exp_courses, VIA_INGRESO = "ORDINARIA PAA")
exp_data2016$SIGLA <- fct_infreq(exp_data2016$SIGLA)
p1_2013 = ggplot(exp_data2013, aes(x = SIGLA)) + geom_bar(fill = "steelblue", width = 0.5) + theme(axis.text.x = element_text(angle = 45, hjust = 1), plot.title = element_text(hjust = 0.5), axis.text = element_text(size = 9)) + labs(x = "Sigla", y = "Freq", title = "Cantidad alumnos por exploratorios 2013")
p1_2014 = ggplot(exp_data2014, aes(x = SIGLA)) + geom_bar(fill = "steelblue", width = 0.5) + theme(axis.text.x = element_text(angle = 45, hjust = 1), plot.title = element_text(hjust = 0.5), axis.text = element_text(size = 9)) + labs(x = "Sigla", y = "Freq", title = "Cantidad alumnos por exploratorios 2014")
p1_2015 = ggplot(exp_data2015, aes(x = SIGLA)) + geom_bar(fill = "steelblue", width = 0.5) + theme(axis.text.x = element_text(angle = 45, hjust = 1), plot.title = element_text(hjust = 0.5), axis.text = element_text(size = 9)) + labs(x = "Sigla", y = "Freq", title = "Cantidad alumnos por exploratorios 2015")
p1_2016 = ggplot(exp_data2016, aes(x = SIGLA)) + geom_bar(fill = "steelblue", width = 0.5) + theme(axis.text.x = element_text(angle = 45, hjust = 1), plot.title = element_text(hjust = 0.5), axis.text = element_text(size = 9)) + labs(x = "Sigla", y = "Freq", title = "Cantidad alumnos por exploratorios 2016")
grid.arrange(p1_2013, p1_2014, p1_2015, p1_2016, ncol = 2)
exp_data <- subset(data, SIGLA %in% exp_courses)
exp_data$SIGLA <- fct_infreq(exp_data$SIGLA)
ggplot(exp_data, aes(x = SIGLA)) + geom_bar(fill = "steelblue", width = 0.5) + theme(axis.text.x = element_text(angle = 45, hjust = 1), plot.title = element_text(hjust = 0.5), axis.text = element_text(size = 9)) + labs(x = "Sigla", y = "Freq", title = "Cantidad alumnos por exploratorios 2013-2016")
```
En el gráfico 1, podemos ver que los 3 eploratorios más tomados corresponden a:
- Optimización (ICS1113)
- Mecánica de Fluidos (ICH1104)
- ING(1024)
Pero estos cursos corresponden a cursos mínimos de las especializades más tomadas, por lo tanto es necesario filtrar los datos para no incluir ramos de la especialidad de cada alumno.
\newline
#### Cantidad de exploratorios tomados
Resumen de los datos:
```{R, fig.height = 5}
exp_data1 <- exp_data %>% group_by(RUT) %>% summarise(Freq = n())
summary(exp_data1$Freq)
p2_1 <- ggplot(exp_data1, aes(x = "", y = Freq)) + geom_boxplot(fill = "steelblue") + coord_cartesian(ylim = c(0, 11)) + labs(x = "", y = "Freq", title = "Cantidad de exploratorios tomados 2013-2016") + scale_y_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
p2_2 <- ggplot(exp_data1, aes(x = Freq)) + geom_bar(fill = "steelblue", width = 0.5) + labs(x = "Cantidad tomada", y = "Freq", title = "Cantidad de exploratorios tomados 2013-2016") + theme(axis.text.x = element_text(angle = 45, hjust = 1)) + scale_x_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
grid.arrange(p2_1, p2_2, ncol = 2)
```
Como se puede ver en el resumen de los datos, la media de la cantidad de exploratorios tomados es 4.021, esto nos da un indicio (aún hay que limpiar más los datos), de que efectivamente los alumnos toman más de un exploratorio durante su carrera, lo que podría deberse a una indecisión sobre que especialidad tomar.
\newline
```{r plot1, warning=TRUE, fig.height = 16}
exp_data1_2013 <- exp_data2013 %>% group_by(RUT) %>% summarise(Freq = n())
exp_data1_2014 <- exp_data2014 %>% group_by(RUT) %>% summarise(Freq = n())
exp_data1_2015 <- exp_data2015 %>% group_by(RUT) %>% summarise(Freq = n())
exp_data1_2016 <- exp_data2016 %>% group_by(RUT) %>% summarise(Freq = n())
p2_1_2013 <- ggplot(exp_data1_2013, aes(x = "", y = Freq)) + geom_boxplot(fill = "steelblue") + coord_cartesian(ylim = c(0, 11)) + labs(x = "", y = "Freq", title = "Cantidad de exploratorios tomados 2013") + scale_y_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
p2_2_2013 <- ggplot(exp_data1_2013, aes(x = Freq)) + geom_bar(fill = "steelblue", width = 0.5) + labs(x = "Cantidad tomada", y = "Freq", title = "Cantidad de exploratorios tomados 2013") + theme(axis.text.x = element_text(angle = 45, hjust = 1)) + scale_x_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
p2_1_2014 <- ggplot(exp_data1_2014, aes(x = "", y = Freq)) + geom_boxplot(fill = "steelblue") + coord_cartesian(ylim = c(0, 11)) + labs(x = "", y = "Freq", title = "Cantidad de exploratorios tomados 2014") + scale_y_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
p2_2_2014 <- ggplot(exp_data1_2014, aes(x = Freq)) + geom_bar(fill = "steelblue", width = 0.5) + labs(x = "Cantidad tomada", y = "Freq", title = "Cantidad de exploratorios tomados 2014") + theme(axis.text.x = element_text(angle = 45, hjust = 1)) + scale_x_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
p2_1_2015 <- ggplot(exp_data1_2015, aes(x = "", y = Freq)) + geom_boxplot(fill = "steelblue") + coord_cartesian(ylim = c(0, 11)) + labs(x = "", y = "Freq", title = "Cantidad de exploratorios tomados 2015") + scale_y_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
p2_2_2015 <- ggplot(exp_data1_2015, aes(x = Freq)) + geom_bar(fill = "steelblue", width = 0.5) + labs(x = "Cantidad tomada", y = "Freq", title = "Cantidad de exploratorios tomados 2015") + theme(axis.text.x = element_text(angle = 45, hjust = 1)) + scale_x_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
p2_1_2016 <- ggplot(exp_data1_2016, aes(x = "", y = Freq)) + geom_boxplot(fill = "steelblue") + coord_cartesian(ylim = c(0, 11)) + labs(x = "", y = "Freq", title = "Cantidad de exploratorios tomados 2016") + scale_y_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
p2_2_2016 <- ggplot(exp_data1_2016, aes(x = Freq)) + geom_bar(fill = "steelblue", width = 0.5) + labs(x = "Cantidad tomada", y = "Freq", title = "Cantidad de exploratorios tomados 2016") + theme(axis.text.x = element_text(angle = 45, hjust = 1)) + scale_x_continuous(name = "Cantidad tomada", limits = c(0, 11), breaks = seq(0, 11, 1))
grid.arrange(p2_1_2013, p2_2_2013, p2_1_2014, p2_2_2014, p2_1_2015, p2_2_2015, p2_1_2016, p2_2_2016, ncol = 2)
```
\newline