Reporte de Impacto: Programación Vamos Alto FJ25, Mentor Osvaldo López sede Robles

Contexto

Analisis Inicio de Ciclo

Librerias

library(ggplot2)
library(dplyr)
## 
## Adjuntando el paquete: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union

Carga de Datos

datos <- read.csv("C:\\Users\\Osval\\Music\\Tilinos\\reportealumnos.csv")

str(datos)  
## 'data.frame':    33 obs. of  4 variables:
##  $ Nombre       : chr  "ALAN SAJID HINOJOSA PUENTE " "ERNESTO ALEJANDRO ESCOBAR MENDOZA " "INGRID ITZEL OSORIO CEDILLO " "JUAN CANDELARIO SALAS DUARTE " ...
##  $ Grupo        : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ Asistencia   : int  2 1 2 2 0 0 2 0 1 1 ...
##  $ Calificacion1: num  0.75 0.667 0.167 0.667 NA ...
columna_numerica <- datos$Calificacion1
datos <- datos %>%
  mutate(
    Grupo = as.factor(Grupo),
    ColumnaNumerica = as.numeric(Calificacion1)  
  ) %>%
  na.omit()  

Análisis exploratorio de datos

# Histograma
hist(columna_numerica, main = "Histograma de Datos Grupo General", col = "gray", border = "black",
     xlab = "Valores", ylab = "Frecuencia", breaks = 10)

# Boxplot
boxplot(columna_numerica, main = "Boxplot de Datos General", col = "gray", horizontal = TRUE)

# Histograma con facetado
ggplot(datos, aes(x = ColumnaNumerica, fill = Grupo)) + 
  geom_histogram(alpha = 0.6, color = "black", bins = 10) + 
  labs(title = "Histograma por Grupo", x = "Valores", y = "Frecuencia") +
  facet_wrap(~Grupo, ncol = 1) +  
  theme_minimal() +
  scale_fill_manual(values = c("gray", "black"))

# Boxplot 

stats <- datos %>%
  group_by(Grupo) %>%
  summarise(
    Mediana = median(ColumnaNumerica),
    Q1 = quantile(ColumnaNumerica, 0.25),
    Q3 = quantile(ColumnaNumerica, 0.75)
  )


ggplot(datos, aes(x = Grupo, y = ColumnaNumerica, fill = Grupo)) +
  geom_boxplot(alpha = 0.6) +
  geom_text(data = stats, aes(x = Grupo, y = Mediana, label = paste("Mediana:", round(Mediana, 2))), vjust = -0.5, size = 4, color = "black") +
  geom_text(data = stats, aes(x = Grupo, y = Q1, label = paste("Q1:", round(Q1, 2))), vjust = -0.5, size = 4, color = "gray") +
  geom_text(data = stats, aes(x = Grupo, y = Q3, label = paste("Q3:", round(Q3, 2))), vjust = -0.5, size = 4, color = "black") +
  labs(title = "Boxplot por Grupo con Estadísticas", x = "Grupo", y = "Valores") +
  scale_fill_manual(values = c("gray", "black")) +
  theme_minimal()